Updated prompting to new yeoman-generator api (#272)

Updated prompting to new yeoman-generator api

Fixes #271
This commit is contained in:
Stephan 2016-08-12 11:21:40 +02:00 committed by GitHub
parent 9756541eca
commit c9cfbf1e9a

View File

@ -36,8 +36,7 @@ module.exports = generator.Base.extend({
}, },
prompting: function() { prompting: function() {
let done = this.async(); return this.prompt(prompts, function(props) {
this.prompt(prompts, function(props) {
// Make sure to get the correct app name if it is not the default // Make sure to get the correct app name if it is not the default
if(props.appName !== utils.yeoman.getAppName()) { if(props.appName !== utils.yeoman.getAppName()) {
@ -47,7 +46,7 @@ module.exports = generator.Base.extend({
// Set needed global vars for yo // Set needed global vars for yo
this.appName = props.appName; this.appName = props.appName;
this.style = props.style; this.style = props.style;
this.postcss = props.postcss this.postcss = props.postcss;
this.generatedWithVersion = packageInfo.version.split('.').unshift(); this.generatedWithVersion = packageInfo.version.split('.').unshift();
// Set needed keys into config // Set needed keys into config
@ -59,7 +58,6 @@ module.exports = generator.Base.extend({
this.config.save(); this.config.save();
done();
}.bind(this)); }.bind(this));
}, },