add 'architecture' question, Reflux option, and related store and actionCreator

This commit is contained in:
Yonatan Schreiber
2015-04-04 14:42:52 +03:00
parent 356df8ec9a
commit f7bb3c2b80
15 changed files with 107 additions and 42 deletions
+12 -7
View File
@@ -66,16 +66,21 @@ ReactWebpackGenerator.prototype.askForReactRouter = function () {
}.bind(this));
};
ReactWebpackGenerator.prototype.askForFlux = function() {
ReactWebpackGenerator.prototype.askForArchitecture = function() {
var done = this.async();
this.prompt({
type : 'confirm',
name : 'flux',
message : 'Would you like to include flux?',
type : 'list',
name : 'architecture',
message : 'Would you like to use one of those architectures?',
choices: [
{name:'No need for that, thanks',value:false},
{name:'Flux',value:'flux'},
{name:'ReFlux',value:'reflux'}
],
default : false
}, function(props) {
this.env.options.flux = props.flux;
this.config.set('flux', props.flux);
this.env.options.architecture = props.architecture;
this.config.set('architecture', props.architecture);
done();
}.bind(this));
};
@@ -113,7 +118,7 @@ ReactWebpackGenerator.prototype.createIndexHtml = function createIndexHtml() {
ReactWebpackGenerator.prototype.packageFiles = function () {
this.es6 = this.options.es6;
this.reactRouter = this.env.options.reactRouter;
this.flux = this.env.options.flux;
this.architecture = this.env.options.architecture;
this.stylesLanguage = this.env.options.stylesLanguage;
this.template('../../templates/common/_package.json', 'package.json');
this.template('../../templates/common/_webpack.config.js', 'webpack.config.js');