corrade-nucleus-nucleons – Blame information for rev 20

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 # 编译 CSS 和 JavaScript []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/getting-started/grunt.md)
2  
3 ---
4  
5 Bootstrap table 使用 [Grunt](http://gruntjs.com/) 来作为编译系统,可以用十分方便的方法来编译我们代码,或者文档等等。
6  
7 ## 安装 Grunt
8  
9 安装 Grunt,你必须先 [下载和安装 node.js](http://nodejs.org/download/) (包含 npm)。npm 是 [node 的包模块](http://npmjs.org/) 管理工具。
10  
11 然后,我们使用命令行:
12  
13 1. 安装全局的 `grunt-cli`,使用 `npm install -g grunt-cli` 命令即可。
14 2. 进入到 `/bootstrap-table/` 的根目录,然后运行 `npm install`。npm 将通过查找 `package.json` 文件并自动安装这里所需要的依赖。
15  
16 完成之后,你就可以运行一下的命令来编译的代码了。
17  
18 ## 可以用的 Grunt 命令
19  
20 ### `grunt dist` (编译 CSS 和 JavaScript)
21  
22 这里我们会生成 `/dist/` 文件夹。 As a Bootstrap user, this is normally the command you want.
23  
24 ### `grunt test` (运行 tests)
25  
26 运行 [JSHint](http://jshint.com/) 来测试我们的代码。
27  
28 ### `grunt docs` (编译和测试文档)
29  
30 编译和测试 CSS,JavaScript,本地我们可以通过 `jekyll serve` 来运行我们的文档。
31  
32 ### `grunt` (编译所有并运行测试)
33  
34 压缩和扰乱 CSS 和 JavaScript,测试,编译文档等等。依赖 [Jekyll](http://jekyllrb.com/docs/installation/)。
35  
36 ## 遇到问题
37  
38 如果你安装或运行依赖是遇到问题,首先删除 `/node_modules/` npm 生成的文件夹。然后,再运行一次 `npm install` 即可。