Woowahan.js의 command line utility 입니다.
woowahan-cli를 사용하기 위해서는 nodejs, npm 이 설치되어있어야 합니다.
- WoowahanJS
- Webpack
- Babel
npm install -g woowahan-cli
woowahan-cli <command> <option>
'YourAppName' 의 신규 App 생성
woowahan-cli new YourAppName
기존에 폴더가 존재하는 경우 해당 폴더를 대상으로 Woowahan App 생성
mkdir yourFolder
cd yourFolder
woowahan-cli init YourAppName
App
|- node_modules
|- actions
|-- index.js
|- assets
|-- css
|-- default.scss
|- layouts
|-- default.js
`-- default.hbs
|- reducers
|-- idnex.js
|-- posts.js
|-- toolbox.js
|- views
|-- home
|-- index.js
`-- index.hbs
|-- posts
|-- row-items
| |-- index.js
| `-- index.hbs
|-- index.js
`-- index.hbs
|-- index.html
|-- main.js
|- .babelrc
|- README.md
|- package.json
|- webpack.config.js
woowahan-cli new YourAppName
cd YourAppName
npm run dev
http://localhost:8080 에서 확인 가능합니다.
woowahan-cli new YourAppName
cd YourAppName
npm run build
빌드된 파일은 dist 폴더에 생성됩니다.
App
|- dist
|-- bundle.js
|-- css
|-- default.css
|-- index.html
|- node_modules
|- actions
|-- index.js
|- assets
|-- css
|-- default.scss
|- layouts
|-- default.js
`-- default.hbs
|- reducers
|-- idnex.js
|-- posts.js
|-- toolbox.js
|- views
|-- home
|-- index.js
`-- index.hbs
|-- posts
|-- row-items
| |-- index.js
| `-- index.hbs
|-- index.js
`-- index.hbs
|-- index.html
|-- main.js
|- .babelrc
|- README.md
|- package.json
|- webpack.config.js
생성된 파일을 확인하기 위해서는 로컬서버를 통해서 확인가능합니다. 간단한 서버를 위해서 'http-server' 를 다운받습니다.
npm install -g http-server
cd dist
http-server
http://localhost:8080 에서 빌드된 파일을 확인 가능합니다.
git clone https://github.com/woowabros/woowahan-cli.git
cd woowahan-cli
npm link
로컬상태에서 woowahan-cli를 사용하실 수 있습니다.