Total Pageviews

Sunday 10 August 2014

grunt-init-html

npm install grunt-init -g
执行文件为/root/npm/bin/grunt-init
克隆如下的模板到~/.grunt-init/ :
git clone https://github.com/sethvincent/grunt-init-html ~/.grunt-init/html/
mkdir grunt-init-site
cd grunt-init-site

as3:~# mkdir grunt-init-site
as3:~# cd grunt-init-site
as3:~/grunt-init-site# /root/npm/bin/grunt-init html
显示:
Running "init:html" (init) task
This task will create one or more files in the current directory, based on the
environment and the answers to a few questions. Note that answering "?" to any
question will show question-specific help and answering "none" to most questions
will leave its value blank.

"html" template notes:
yeah, html!

Please answer the following:
[?] Project name (grunt-init-site)
[?] Description (The best project ever.)
[?] Project git repository (git://github.com/root/grunt-init-site.git)
[?] Project homepage (https://github.com/root/grunt-init-site)
[?] Author name (root)
[?] Author email (luckypoem@gmail.com)
[?] Author url (none)
[?] Licenses (MIT)
[?] Version (0.0.0)
[?] What versions of node does it run on? (>= 0.10.0)
[?] Do you need to make any changes to the above before continuing? (y/N) n

Writing .gitignore...OK
Writing .jshintrc...OK
Writing Gruntfile.js...OK
Writing README.md...OK
Writing app.js...OK
Writing bower.json...OK
Writing index.html...OK
Writing style.css...OK
Writing LICENSE-MIT...OK
Writing package.json...OK

Initialized from template "html".
Now you need to install project and dev dependencies by running:

npm install && bower install

Done, without errors.
as3:~/grunt-init-site# npm install
as3:~/grunt-init-site# bower install --allow-root
as3:~/grunt-init-site# ls
app.js            bower.json    index.html   node_modules  README.md
bower_components  Gruntfile.js  LICENSE-MIT  package.json  style.css
as3:~/grunt-init-site# nohup Rwebserver 34073 > /dev/null &
访问http://as3.brite.biz:34073/

项目地址:https://github.com/sethvincent/grunt-init-html