วันพฤหัสบดีที่ 5 กันยายน พ.ศ. 2556

how to install angular with yeoman in mac | ลง angular กับ yeoman ใน mac


*** Before create angular project every time run npm cache clean
resource
install xcode from appstore for easy install command line 
install command line at xcode
install git (optional) or download souretree

install homebrew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
sudo mkdir /usr/local/Cellar
sudo chown -R `whoami` /usr/local
sudo chown -R `whoami` ~/.npm
echo 'export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"' >> ~/.bash_profile
brew doctor --verbose

install rvm with ruby
\curl -L https://get.rvm.io | bash -s stable --ruby

before install by using compass
gem sources -a http://production.cf.rubygems.org/

install compass
gem update --system
gem install compass

install node
brew install node
or
download from http://nodejs.org/

install bower
npm install -g bower

install grunt
npm install -g grunt-cli

install yo
npm install -g yo

install anular
npm install -g generator-webapp
npm install -g generator-angular

create app
yo angular

run
  grunt server

build
  grunt build 
  grunt build -f

why css broken
  

missing glyphicons-halflings-white.png, glyphicons-halflings.png

when add new component
  open and edit component.json in dependencies

where is .css
  .tmp/~

where is missing components when download from git
  bower install [component]

Auto save component to component
  bower install --save [component]

don't want to bower install (not recommend)
  open .gitignore remove app/components

test
  karma start


If you want to custom folder than you should config Gruntfile.js

ไม่มีความคิดเห็น:

แสดงความคิดเห็น