We welcome additional recipes for common use-cases not covered by this generator.
The recipe should be up-to-date as much as possible. If you haven't already, clone the generator and link it:
$ git clone https://github.com/yeoman/generator-webapp
$ cd generator-webapp
$ npm link
$ cd ../
Now the yo webapp
command will use that version of the generator. To make sure this is actually true:
$ npm ls -g generator-webapp
# you should get something like
/usr/local/lib
└── [email protected] -> /Users/username/generator-webapp
To update the generator, all you need to do is:
$ cd generator-webapp
$ git pull origin master
$ npm install
$ cd ../
Writing a recipe without actually testing it is very hard and error-prone, you should create a test project. Let's say you're writing a recipe for Stylus:
$ mkdir recipe-stylus && cd $_
$ yo webapp
# select all options
You should now create a Git repository and commit everything, this will allow you to see exactly which changes are required to implement Stylus:
$ git init
$ git add .
$ git commit -m "Initial commit"
Do whatever is necessary to get Stylus working, install required grunt plugins, change Gruntfile.js
, update styles etc.
After you've completed a minimal set of changes to implement Stylus, run git diff
and use the output to write the recipe.