A generator for Yeoman.
To get started:
$ npm install -g yo
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-mg
from npm, run:
$ npm install -g generator-mg
Finally, initiate the generator:
$ yo mg
The Gruntfile.coffee
simply namespaces the various tasks into larger tasks.
Configuration for each task is in the /grunt/
directory.
There are a few main Grunt tasks:
grunt
to run all the tasksgrunt server
which sets up watch task and a local server (port 9000 by default) that will livereload on most devices automagically.grunt watch
if a local server isn't needed.
###Templating
Templating is handled by the Assemble plugin. Any files in the templates/pages/
directory are compiled into a .html
version in the dist/
directory.
Handlebars + YAML data files are the defaults used by Mg. See an example data file in data/index.yml
.
To stay up to date with the latest build of Mg, run npm update -g generator-mg
periodically on your system.
If you'd like to get to know Yeoman better and meet some of his friends, Grunt and Bower, check out the complete Getting Started Guide.