Yeoman安裝

Yeoman安裝html

Yeoman實際上是三個工具的集合:YOGRUNTBOWER前端

  • YO:Yeoman核心工具,項目工程依賴目錄和文件生成工具,項目生產環境和編譯環境生成工具
  • GRUNT:grunt去年很火,前端構建工具,jquery就是使用這個工具打包的
  • BOWER:Web開發的包管理器,概念上相似npm,npm專一於nodeJs模塊,而bower專一於CSS、JavaScript、圖像等前端相關內容的管理

 

下面這幅圖很形象的代表了他們三者之間的協做關係。 node

Yeoman(Yo、gulp、Bower)——前端工程化-新手之路
 
 
Getting Started
 
Install dependencies:  npm install --global yo gulp-cli bower (注意標綠的文字,網上的不少是grunt-cli是坑來的 )
Install the generator:  npm install --global generator-webapp
Run  yo webapp to scaffold your webapp
Run  gulp serve to preview and watch for changes
Run  bower install --save to install frontend dependencies
Run  gulp serve:test to run the tests in the browser
Run  gulp to build your webapp for production
Run  gulp serve:dist to preview the production build
相關文章
相關標籤/搜索