搭建grunt開發環境

安裝nodejavascript

nvm管理node  http://javascript.ruanyifeng.com/nodejs/basic.html   html

淘寶npm鏡像  http://npm.taobao.org/  java

 

安裝rubyinstaller (gem)  node

1. 經過npm安裝, npm install gem  MAC, WINS上都好像可行。 git

2. SUSE經過zypper安裝,除了rubygems, 還有一大推其餘的, 不然後面安裝其餘組件,如compass時就會報錯。  github

 

 

設置ruby gems鏡像 (感謝淘寶源)npm

gem sources -lruby

gem sources -r http://rubygems.org/grunt

gem sources -a https://ruby.taobao.org/工具

gem sources -l

sudo gem update —system 

 

安裝ruby組件

gem install compass    (新版本要裝Compass-blueprint

 

 

全局安裝grunt

 

npm install -g grunt-cli

 
 
進入項目文件夾 npm install

 

 

注意:

1. 這些工具安裝好之後,MAC和Windows平臺是能夠共享的, 裏面package包是同樣的 (這與node.js的版本有關係,要配對,最好就是團隊都安裝同一個版本的node.)

2. imagemin 有些調皮,Fatal error: ENOENT, no such file or directory 'img/XX.png' 參考  http://blog.csdn.net/greenqingqingws/article/details/20370957  

 
如何使用代理?  
DEBUG生產問題, 生產上的JS都是壓縮和污染過的, 如何引用本地的JS來DEBUG? 將你須要的JS, Html等重定向。 
 
http://stackoverflow.com/questions/7960993/fiddler-creating-an-autoresponse-rule-to-map-all-calls-to-one-host-to-another-h    
 
http://www.cnblogs.com/ShepherdIsland/archive/2012/05/22/Fiddler_AutoResponder_REGEX.html
相關文章
相關標籤/搜索