编译一个bootstrap源码文件

首先,请参照如何安装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:

  1. Installgrunt-cliglobally withnpm install -g grunt-cli.
  2. 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.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值