Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
Using this.option so --help display the help message properly
Browse files Browse the repository at this point in the history
  • Loading branch information
revathskumar committed Jun 19, 2014
1 parent b1520c2 commit 0b14c7e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,33 @@ var BackboneGenerator = yeoman.generators.Base.extend({
constructor: function () {
yeoman.generators.Base.apply(this, arguments);

this.option('appPath', {
desc: 'Name of application directory',
type: 'String',
defaults: 'app',
banner: 'some banner'
});

this.option('requirejs', {
desc: 'Support requirejs',
defaults: false
});

this.option('template-framework', {
desc: 'Choose template framework. lodash/handlebars/mustashe',
type: 'String',
defaults: 'lodash'
});

this.option('test-framework', {
desc: 'Choose test framework. mocha/jasmine',
type: 'String',
defaults: 'mocha'
});

this.testFramework = this.options['test-framework'];
this.templateFramework = this.options['template-framework'];

this.argument('app_name', { type: String, required: false });
this.appname = this.app_name || this.appname;
this.appname = this._.classify(this.appname);
Expand Down

0 comments on commit 0b14c7e

Please sign in to comment.