Pages

Friday, 23 May 2014

安装yeoman

npm install -g yeoman
npm install -g yo grunt-cli bower

安装后,执行文件为:
/root/npm/bin/yeoman,/root/npm/bin/_yeomaninsight, /root/npm/bin/yo,/root/npm/bin/grunt,/root/npm/bin/bower

然后,
ln -s /root/npm/bin/yeoman /usr/local/bin/yeoman
ln -s /root/npm/bin/_yeomaninsight /usr/local/bin/_yeomaninsight
ln -s /root/npm/bin/yo /usr/local/bin/yo
ln -s /root/npm/bin/grunt /usr/local/bin/grunt
ln -s /root/npm/bin/bower /usr/local/bin/bower

To create a new yeoman project you can type:
    mkdir yeoman_test
    cd yeoman_test
    yeoman init (此命令会创建~/app/目录,并写入很多东西到~/app/目录)

cd ~/app/
as3:~/app# ls
404.html     images      robots.txt  styles
favicon.ico  index.html  scripts     templates
as3:~/app#
as3:~/app# nohup Rwebserver 30894 > /dev/null &
访问http://as3.brite.biz:30894/即可看到网站效果。