diff --git a/action/index.js b/action/index.js index a07884f..be324a3 100644 --- a/action/index.js +++ b/action/index.js @@ -3,8 +3,11 @@ var util = require('util'); var ScriptBase = require('../script-base.js'); var ActionGenerator = module.exports = function ActionGenerator(args, options, config) { - args[0] += 'ActionCreators'; - ScriptBase.apply(this, arguments); + if (!args[0]) console.log('\n Please specify a name for this action creator \n'); + else { + args[0] += 'ActionCreators'; + ScriptBase.apply(this, arguments) + } }; util.inherits(ActionGenerator, ScriptBase); diff --git a/component/index.js b/component/index.js index 26ca2e9..9fb6074 100644 --- a/component/index.js +++ b/component/index.js @@ -13,6 +13,8 @@ ComponentGenerator.prototype.createComponentFile = function createComponentFile( this.es6 = this.options.es6; + console.log('Creating a component'); + this.generateComponentTestAndStyle( 'Component', 'spec/Component', diff --git a/script-base.js b/script-base.js index 6b6acf5..77834a8 100644 --- a/script-base.js +++ b/script-base.js @@ -82,7 +82,6 @@ Generator.prototype.testTemplate = function (src, dest) { }; Generator.prototype.stylesTemplate = function (src, dest) { - console.log(src); yeoman.generators.Base.prototype.template.apply(this, [ src + this.stylesSuffix, path.join(this.options.stylesPath, dest) + this.stylesSuffix diff --git a/store/index.js b/store/index.js index b277abf..b338678 100644 --- a/store/index.js +++ b/store/index.js @@ -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);