LoginSignup
10
10

More than 5 years have passed since last update.

Mac (Mavericks) に Angular.js + Node 用の Yoman, Grunt の環境を作る

Posted at

Mavericks に Node をインストール

from Mac(Mavericks)

$ brew install node
$ sudo brew postinstall node

Node をアップデート

node のバージョンが 0.10.0 以下だと今後の処理で warnings が出るので、更新します。

$ node -v
---
v0.8.14
$ sudo npm cache clean -f
$ sudo npm install -g n
$ sudo n stable
$ node -v
---
v0.10.18

Yeomanの設定

インストール

$ sudo npm install -g yo grunt-cli bower generator-angular generator-karma

ひな形検索

$ npm search yeoman-generator

ズラッと列挙されます。

ひな形適応

webapp のところはひな形名

$ yo angular

Bower

$ bower install jquery --save

Angular.js テンプレートのインストール

$ yo angular

変なおっさん?みたいなのが出てきたり、色々質問されたりしますが、面倒臭がらずに正直に答えていくと、おっさんが色々よしなにしてくれます。

私は SASS はNO、他は全部YESにしました。

Screen Shot 2014-05-28 at 7.59.01 PM.png

Grunt サーバー起動

$ grunt server

すると、 http://127.0.0.1:9000/#/ でブラウザが開きます。

Screen Shot 2014-05-28 at 9.26.34 PM.png

参考

http://qiita.com/_shimizu/items/26589028ed3ea7e5b359
http://torub.github.io/blog/yeoman.html

10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10