APPRTC分析系列0--grunt过程分析0

一、grunt工具分析

apprtc的编译步骤为:
npm install
grunt build

网上查阅资料,发现grunt为一种构建项目的方式,其基本介绍为
http://www.gruntjs.net/getting-started
通过该介绍可以发现,grunt是通过npm安装和管理的,而npm又是node.js的包管理器。

在编译apprtc之前,需要安装的grunt-cli为Grunt命令行。执行的npm install -g grunt-cli为将命令行安装到全局环境中,其中的-g参数代表global全局的意思,这是npm install的参数。
安装完grunt-cli后,grunt命令就被加入到系统路径中了。

二、grunt过程分析

1、npm install
在apprtc目录下面执行npm install时,npm包管理器读取apprtc目录下面的package.json中的内容,并安装必要的包。
如,apprtc目录下的package.json内容如下

{
  "name": "apprtc",
  "version": "1.0.0",
  "description": "Project checking for AppRTC repo",
  "license": "BSD-3-Clause",
  "main": "Gruntfile.js",
  "repository": {
    "type": "git",
    "url": "https://github.com/webrtc/apprtc.git"
  },
  "scripts": {
    "test": "grunt --verbose"
  },
  "devDependencies": {
    "grunt": "^0.4.0",
    "grunt-cli": ">=0.1.9",
    "grunt-closurecompiler": ">=0.0.21",
    "grunt-contrib-compress": "^0.13.0",
    "grunt-contrib-csslint": ">=0.3.1",
    "grunt-contrib-jshint": ">=0.10.0",
    "grunt-htmlhint": ">=0.9.12",
    "grunt-jinja": ">=0.3.0",
    "grunt-jscs": ">=0.8.1",
    "grunt-jstestdriver-phantomjs": ">=0.0.7",
    "grunt-shell": "^1.1.1",
    "socket.io-client": "^1.2.0",
    "
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值