A simple Yeoman generator to accompany my blog post on Yeoman generators. This is not meant to be a complex example, but rather a learning point for my readers who are getting started on writing custom generators in Yeoman.
The easiest way to get this running is to do the following:
- Make sure you have at Node v4.0 or higher
npm install -g https://github.com/colinjlacy/simple-gen.git
If you want to use it in development:
- Clone this repo to your machine and
cdinto the project root
npm linkin the command line to install it globally
- Be sure to run
- Develop as you like. Any changes will be reflected in global use on your machine.
What it does
To run, the user will type the following in the command line:
$ yo webcake
This will prompt them for a name for an Angular directive, and once they've answered will build a directive file and an accompanying HTML template in a sub-directory of a
components/ folder. The resulting file structure will look like this:
[application root] |-- components |-- awesomeDir |-- awesomeDir.directive.js |-- awesomeDir.tpl.html