Grunt項目的源代碼css
https://github.com/gruntjs/grunt-cligit
在Windows命令行下面使用github
PS E:\Dev\Dev2015> npm install -g grunt-cli
若是grunt-cli已經被安裝,而且存在一個項目已使用package.json和Gruntfile配置,使用Grunt打開該項目,很簡單npm
1.切換到項目根目錄json
2.執行npm installbootstrap
3.運行gruntless
下面以打開Bootstrap項目爲演示grunt
咱們知道Bootstrap項目是使用Grunt做爲編譯系統的,全部固然能夠使用Grunt打開它spa
進入項目目錄命令行
E:\> cd .\Dev\Dev2015\Grunt\bootstrap-3.3.2
執行npm install
npm install
從新構建全部內容
PS E:\Dev\Dev2015\Grunt\bootstrap-3.3.2> grunt
>> Local Npm module "grunt-contrib-qunit" not found. Is it installed?
Running "clean:dist" (clean) task
>> 1 path cleaned.
Running "copy:fonts" (copy) task
Copied 5 files
Running "less:compileCore" (less) task
File dist/css/bootstrap.css.map created.
File dist/css/bootstrap.css created
Running "less:compileTheme" (less) task
File dist/css/bootstrap-theme.css.map created.
File dist/css/bootstrap-theme.css created
一個典型的安裝包含兩個文件:package.json和Gruntfile.js