Files
js-generator-openstack/generators/app/index.js
Michael Krotscheck 8807dc06bf Updates from generator-generator
This patch adds the initial project structure constructed by
yeoman's project generator.
2016-03-22 04:24:04 -07:00

45 lines
997 B
JavaScript

(function () {
'use strict';
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');
module.exports = yeoman.generators.Base.extend({
prompting: function () {
var done = this.async();
// Have Yeoman greet the user.
this.log(yosay(
'Welcome to the fabulous ' + chalk.red('generator-openstack') +
' generator!'
));
var prompts = [{
type: 'confirm',
name: 'someOption',
message: 'Would you like to enable this option?',
default: true
}];
this.prompt(prompts, function (props) {
this.props = props;
// To access props later use this.props.someOption;
done();
}.bind(this));
},
writing: function () {
this.fs.copy(
this.templatePath('dummyfile.txt'),
this.destinationPath('dummyfile.txt')
);
},
install: function () {
this.installDependencies();
}
});
})();