Prereqs
===
Yeoman and the yo
command line tool
Older versions of npm (< 1.2.10) also require a manual install of grunt-cli
and bower
Yeoman allows the user to install generator packages that can be used to scaffold different web frameworks (e.g. Angular, Wordpress, etc.)
npm install -g < generator-name>
npm install -g generator-webapp
yo webapp
npm install -g generator-backbone
yo backbone [app-name]
yo backbone:model blog
To start working with your newly scaffolded site:
To run any tests:
Build a compiled version to a dist
directory that could be deployed
bower install < package> --save-dev
npm install < grunt module> --save-dev
Deploying a Grunt Web App [to Github Pages]
npm install grunt-build-control --save-dev
Then add to your Gruntfile.js
:
...
grunt . initConfigt ( {
...
buildcontrol : {
options : {
dir : '<%= config.dist %>' ,
commit : true ,
push : true
} ,
pages : {
options : {
remote : 'git@github.com:USERNAME/REPO.git' ,
branch : 'gh-pages'
}
}
}
} ) ;