The Yeoman generator written and used by Callum Macrae (callumacrae) in front-end projects. Now with added Gulp!
To install, globally install the npm package (you may need to use sudo):
npm install -g generator-callum
Make a new directory and
cd into it:
mkdir my-amazing-project && cd $_
Then run the yo command:
Stuff what this does
On setup, this generator will do the following:
- Install useful Gulp plugins.
- Install useful Bower plugins (plus any you tell it to).
If you have CasperJS installed, it will offer to install the Gulp plugin and create a testing directory.Nope, returning soon!
- If you want it to, initialise a Git repo, optionally committing files created by the generator.
- If you have hub installed, it will offer to create and push to a GitHub repository.
The generated project by default offers the following features:
- Code validation using jshint, lesslint, and html-validation.
(runThis functionality will be back.
grunt buildto add plugins to RequireJS automatically)
- It'll optionally automatically add jQuery (refer to it as "jquery" in RequireJS).
DEBUGconstant! Debug code will be automatically removed from production.
- CSS awesomeness using LESS.
- CSS reset using Eric Meyer's "Reset CSS" 2.0.
- Uses browser-sync to sync CSS changes between browsers. Also has ghost mode activated by default, so link clicks, form changes and scroll changes are synced between browsers.
Runs your CasperJS tests for you.nope lol
After installation (
yo callum), you can start developing right away. However, you can use gulp and bower to do magic.
bower search. To install a package:
bower install --save <package> # Or: bower install --save <package>#<version>
See the bower homepage for a list of all commands and more help.
More specific to this project, if BRB
grunt watchers is running then bower plugins will be automatically added to your RequireJS build file. Otherwise, run
grunt bower to add them (or just manually add them to the build file).
gulp lintwill validate your HTML, CSS, LESS and JS.
gulp buildwill parse your LESS, but not your JS yet.
gulp browser-syncwill run browser-sync. Awesome.
gulp bowerdoesn't exist, but will add bower libraries that haven't been added yet to the build file.
gulpwill do all of the above, plus it will watch your LESS files for changes!
Copyright © Callum Macrae 2013 Licensed under the MIT license.