Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix initializer example #477

Merged
merged 1 commit into from Sep 16, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/cli/generators.md
Expand Up @@ -221,7 +221,7 @@ lib/generators/initializer/templates/initializer.js with the following content:
And now let’s change the generator to copy this template when invoked:

var util = require('util'),
yeoman = require('../../../');
yeoman = require('yeoman');

module.exports = Generator;

Expand All @@ -233,12 +233,12 @@ And now let’s change the generator to copy this template when invoked:
util.inherits(Generator, yeoman.generatos.NamedBase);

Generator.prototype.copyInitializerFile = function() {
this.copy('initializer.js', 'config/initializers/' + name + '.js');
this.copy('initializer.js', 'config/initializers/' + this.name + '.js');
};

And let’s execute our generator:

$ yeoman generate initializer core_extensions
$ yeoman init initializer core_extensions

We can see that now an initializer named `core_extensions` was created at
`config/initializers/core_extensions.js` with the contents of our template. That
Expand All @@ -249,7 +249,7 @@ we gave. The property `name` is automatically created when we inherit from

### Generators Lookup

When you run `yeoman generate initializer core_extensions` yeoman requires these
When you run `yeoman init initializer core_extensions` yeoman requires these
paths in turn until one is found:

lib/generators/initializer/index.js
Expand Down