generator-botfuel
Version:
Create chatbots using Botfuel sdk
53 lines (45 loc) • 1.46 kB
JavaScript
;
const Generator = require('yeoman-generator');
const chalk = require('chalk');
const yosay = require('yosay');
// const Git = require("nodegit");
// var cloneOrPull = require('git-clone-or-pull');
const path = require('path');
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() {
// const repo = `https://github.com/Botfuel/botfuel-sample-starter.git`;
// Git.Clone(repo, `./${this.props.name}`)
// .then(function(repo) {
// console.log("Cloning done");
// // process.chdir(path.join(process.cwd(), this.repos.name));
// // this.installDependencies();
// // Change working directory subfolder
// var npmdir = process.cwd() + '/webclient';
// process.chdir(npmdir);
// this.installDependencies();
// });
// // cloneOrPull(repo, path.join(process.cwd(), this.props.name), function(err) {
// // if (err) console.log(err);
// // });
// }
install() {
// This.installDependencies();
}
};