Yeoman
- ※バーチャルボックスでは「yo webapp」でエラーが出て使えない!
Yeomanとは
- Yo
- ひな型作成(ジェネレータ)
- Grunt
- タスクランナー
- Bower
- パッケージマネージャ
インストール
-
Node.js のインストール
# yumにepelのリポジトリを追加 rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm yum install nodejs npm --enablerepo=epel
-
git のインストール
-
Yoman のインストール
npm install -g yo grunt-cli bower # [npm]は、nodeのパッケージマネージャ
-
ジェネレータをインストール
npm install -g generator-webapp
使い方
-
yoでプロジェクト作成
mkdir hello_yeoman cd hello_yeoman sudo chown -R `whoami` ~/.npm yo webapp
-
ページ起動
grunt server # 停止は[ctrl + c]
-
ビルド
grunt # distフォルダにサーバにUPするファイルが作成される