安装node

# MAC
brew install node
node -v
npm -v

# WIN[下载][0]
# 安装cli
npm install -g grunt-cli
npm install -g grunt
npm install -g grunt-init   #编写插件用
grunt --version

基本操作

grunt init

编写插件

git clone git://github.com/gruntjs/grunt-init-gruntplugin.git ~/.grunt-init/gruntplugin
grunt-init gruntplugin
npm install

#npm配置代理
npm config set proxy http://server:port
npm config set https-proxy http://server:port
# 需要认证
npm config set proxy http://username:password@server:port
npm config set https-proxy http://username:pawword@server:port
# 查看
npm config list


Comments

comments powered by Disqus