mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-09-11 12:10:36 +08:00
add protection against creating an action/store with no name
This commit is contained in:
+6
-3
@@ -3,9 +3,12 @@ var util = require('util');
|
||||
var ScriptBase = require('../script-base.js');
|
||||
|
||||
var StoreGenerator = module.exports = function StoreGenerator(args, options, config) {
|
||||
args[0] += 'Store';
|
||||
ScriptBase.apply(this, arguments);
|
||||
}
|
||||
if (!args[0]) console.log('\n Please specify a name for this store \n');
|
||||
else {
|
||||
args[0] += 'Store';
|
||||
ScriptBase.apply(this, arguments)
|
||||
}
|
||||
};
|
||||
|
||||
util.inherits(StoreGenerator, ScriptBase);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user