UNPKG

generator-rxreact-module

Version:

Yeoman generator for javascript modules on top of Rx.js and React.js libraries

29 lines (26 loc) 855 B
var generator = require('yeoman-generator'); module.exports = generator.Base.extend({ askModuleName: function() { var done = this.async(); this.prompt({ type : 'input', name : 'name', message : 'What will be your module name?' }, function (answers) { this.moduleName = answers.name; done(); }.bind(this)); }, writing: function() { this.fs.copyTpl( this.templatePath('default/**/*.*'), this.destinationPath(this.moduleName), {moduleName: this.moduleName} ); }, done: function() { this.log.ok( "Initial structure for module " + this.moduleName + " is ready."); this.log.writeln("Don't forget to add " + this.moduleName + " to the recipe file !!!"); } });