首先,请参照如何安装nodejs等
http://blog.youkuaiyun.com/rogerjava/article/details/18657219
然后按照bootstrap的文档
Compiling CSS and JavaScript
Bootstrap usesGruntwith convenient methods for working with the framework. It's how we compile our code, run tests, and more. To use it, install the required dependencies as directed and then run some Grunt commands.
Install Grunt
From the command line:
- Install
grunt-cliglobally withnpm install -g grunt-cli. - Navigate to the root
/bootstrapdirectory, then runnpm install. npm will look atpackage.jsonand automatically install the necessary local dependencies listed there.
When completed, you'll be able to run the various Grunt commands provided from the command line.
Unfamiliar withnpm? Don't have node installed?That's a-okay. npm stands fornode packaged modulesand is a way to manage development dependencies through node.js.Download and install node.jsbefore proceeding.
Available Grunt commands
Build -grunt
Rungruntto run tests locally and compile the CSS and JavaScript into/dist.UsesLessandUglifyJS.
Only compile CSS and JavaScript -grunt dist
grunt distcreates the/distdirectory with compiled files.UsesLessandUglifyJS.
Tests -grunt test
RunsJSHintandQUnittests headlessly inPhantomJS(used for CI).
Watch -grunt watch
This is a convenience method for watching just Less files and automatically building them whenever you save.
本文指导您如何安装Node.js并使用Grunt编译Bootstrap的CSS和JavaScript,包含详细的步骤和依赖安装指南。
722

被折叠的 条评论
为什么被折叠?



