botfuel-yeoman-generator
Version:
Create chatbots using Botfuel sdk
38 lines (32 loc) • 826 B
JavaScript
;
const Generator = require('yeoman-generator');
const chalk = require('chalk');
const yosay = require('yosay');
module.exports = class extends Generator {
prompting() {
// Have Yeoman greet the user.
this.log(
yosay(`Welcome to the delightful ${chalk.red('generator-botfuel')} generator!`)
);
const prompts = [
{
type : 'input',
name : 'name',
message : 'Enter your project name (i.e.: myAwesomeChatbot): '
}
];
return this.prompt(prompts).then(props => {
// To access props later use this.props.someAnswer;
this.props = props;
});
}
writing() {
this.fs.copy(
this.templatePath('dummyfile.txt'),
this.destinationPath('dummyfile.txt')
);
}
install() {
this.installDependencies();
}
};