1. Install node and npm
sudo apt-get install nodejs-legacy npm
2. Install grunt
sudo npm install -g grunt-cli
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.js sudo apt-get update sudo apt-get install nodejs # remove a conflicting install of npm that I had tried earlier sudo apt-get update && sudo apt-get -y dist-upgrade sudo 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 试试吧