Skip to content

Commit

Permalink
support command line arguments (electrode-io#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
animesh10 authored and jchip committed Jun 13, 2017
1 parent 9e72f81 commit b092823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/generator-electrode/component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ var yeoman = require("yeoman-generator");
var path = require('path');
var extend = _.merge;
var parseAuthor = require('parse-author');
var optionOrPrompt = require("yeoman-option-or-prompt");

var ReactComponentGenerator = yeoman.Base.extend({
constructor: function () {
yeoman.Base.apply(this, arguments);
this.quotes = this.options.quotes;
this.githubUrl = this.options.githubUrl || "https://github.com";
this.optionOrPrompt = optionOrPrompt;
},
initializing: function () {
this.isAddon = this.options.isAddon || false;
Expand Down Expand Up @@ -104,7 +106,7 @@ var ReactComponentGenerator = yeoman.Base.extend({
message: "Would you like to create a new directory for your project?",
default: true
}];
return this.prompt(prompts).then((props) => {
return this.optionOrPrompt(prompts).then((props) => {
this.props = extend(this.props, props);
this.projectName = this.props.projectName;
this.packageName = this.props.projectName;
Expand Down
1 change: 1 addition & 0 deletions packages/generator-electrode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"lodash": "^4.16.1",
"parse-author": "^1.0.0",
"yeoman-generator": "^0.23.4",
"yeoman-option-or-prompt": "^2.0.0",
"yosay": "^1.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit b092823

Please sign in to comment.