Ubuntu13搭建Grunt/Nodejs/QUnit

来源:互联网 发布:java list取某一个 编辑:程序博客网 时间:2024/05/17 07:56

1. Install node and npm
sudo apt-get install nodejs-legacy npm

2. Install grunt
sudo npm install -g grunt-cli

这是可能在不同的环境下遇到grunt 安装问题,参考如下blog做了更新:

 http://askubuntu.com/questions/337976/installing-grunt-js-on-13-04

I just installed grunt from PPA. Here is a full list of steps that I had to take to get a working grunt build:

sudo add-apt-repository ppa:chris-lea/node.jssudo apt-get update sudo apt-get install nodejs# remove a conflicting install of npm that I had tried earliersudo apt-get update && sudo apt-get -y dist-upgradesudo npm install -g grunt grunt-cli grunt-contrib-clean grunt-replace grunt-contri
 grunt-contrib-watch grunt-contrib-jasmine grunt-contrib-connect grunt-saucelabs grunt-gitinfo

3. Reclaim ownership of your .npm directory (seems to happen on Ubuntu)
sudo chown -R $(whoami) ~/.npm

ubuntu里貌似默认就好了,可以忽略这一步

4.现在把你的代码准备好

5. 配置package.json, gruntfile.js

6. grunt build 试试吧


0 0
原创粉丝点击