Yeoman筆記
Yeomen是什么
Yeoman幫助你創(chuàng)建新的項(xiàng)目侧到,規(guī)定最佳實(shí)踐和工具來幫助你保證項(xiàng)目富有生產(chǎn)性
工具
- 腳手架工具 yo
- 構(gòu)建工具 grunt、gulp等
- 包管理工具 bower和npm
用Yeoman創(chuàng)建一個(gè)webapp架子
安裝yo和一些generator
$ npm install -g yo
安裝腳手架
安裝generator-react-webpack
$ npm install -g generator-react-webpack
創(chuàng)建一個(gè)目錄,在目錄下執(zhí)行.在命令行下按照提示選擇相應(yīng)有css
$ yo react-webpack
_-----_
| |
|--(o)--| .--------------------------.
`---------′ | Welcome to Yeoman, |
( _′U`_ ) | ladies and gentlemen! |
/___A___\ '__________________________'
| ~ |
__'.___.'__
′ ` |° ′ Y `
Out of the box I include Webpack and some default React components.
? Please choose your application name demo
? Which style language do you want to use? sass
? Enable postcss? Yes
生成的項(xiàng)目文件
運(yùn)行項(xiàng)目
npm start