A generator for Yeoman.
To make use of all of the tools that the Pugpig Generator provides, here is the full list of dependencies.
npm install -g phantomjs
Trick question. It's not a thing. It's this guy:
Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.
Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things.
$ npm install -g yo
Before you generate a project, you should type:
For a list of your generators and you will also be shown which generators have updates available. Please try and use the latest version of the generator unless otherwise specified.
Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.
To install generator-pugpig from npm, run:
$ npm install -g generator-pugpig
Finally, initiate the generator:
$ yo pugpig
The Pugpig generator comes with several "sub generators" for your generating pleasure.
The first is a testing sub generator which is used by running:
$ yo pugpig:testing all
This will output the Pugpig Boilerplate test folder in the folder it is run in. It will include functional and unit testing examples and the libraries that are required. An added bonus is the inclusion of the Pugpig CSS Regression testing tool (https://github.com/kaldor/pugpig-css-regression) and the Pugpig Feed Page Validator tool(https://github.com/kaldor/pugpig-feed-page-validator). Currently the dependencies for these tools need to be installed manually but will be automated in a future release.
You can output only the functional test example, or only the unit test examples by running:
$ yo pugpig:testing unit
$ yo pugpig:testing functional
You can only generate the CSS Regression testing tool by running:
$ yo pugpig:testing css
You can only generate the Feed Page Validator tool by running:
$ yo pugpig:testing html
Want to start a new template? The template generator is here for you.
$ yo pugpig:template "Template Name"
This will be appended automatically to your index.html table of contents and a new Sass file will be created for your template and used within.
Also included is a component generator for outputting a new CSS file for a component in your template. This is used by running:
$ yo pugpig:component "Component Name"
This will be appended automatically to your components partial.
Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.