don't log "Next steps" messages until `npm install` has finished
This commit is contained in:
parent
585e286adb
commit
aa87614a98
|
@ -61,19 +61,20 @@ class TemplateGenerator {
|
||||||
this.installTemplate(
|
this.installTemplate(
|
||||||
fspath,
|
fspath,
|
||||||
name,
|
name,
|
||||||
(this.templateName === 'boilerplate' || this.templateName === 'demo')
|
(this.templateName === 'boilerplate' || this.templateName === 'demo'),
|
||||||
|
() => {
|
||||||
|
if (name === 'embark_demo') {
|
||||||
|
console.log('-------------------'.yellow);
|
||||||
|
console.log(__('Next steps:').green);
|
||||||
|
console.log(('-> ' + ('cd ' + fspath).bold.cyan).green);
|
||||||
|
console.log('-> '.green + 'embark run'.bold.cyan);
|
||||||
|
console.log(__('For more info go to http://embark.status.im').green);
|
||||||
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (name === 'embark_demo') {
|
|
||||||
console.log('-------------------'.yellow);
|
|
||||||
console.log(__('Next steps:').green);
|
|
||||||
console.log(('-> ' + ('cd ' + fspath).bold.cyan).green);
|
|
||||||
console.log('-> '.green + 'embark run'.bold.cyan);
|
|
||||||
console.log(__('For more info go to http://embark.status.im').green);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
installTemplate(templatePath, name, installPackages) {
|
installTemplate(templatePath, name, installPackages, cb) {
|
||||||
utils.cd(templatePath);
|
utils.cd(templatePath);
|
||||||
utils.sed('package.json', '%APP_NAME%', name);
|
utils.sed('package.json', '%APP_NAME%', name);
|
||||||
if (fs.existsSync('dot.gitignore')) {
|
if (fs.existsSync('dot.gitignore')) {
|
||||||
|
@ -93,6 +94,7 @@ class TemplateGenerator {
|
||||||
}
|
}
|
||||||
console.log(__('Init complete').green);
|
console.log(__('Init complete').green);
|
||||||
console.log('\n' + __('App ready at ').green + templatePath);
|
console.log('\n' + __('App ready at ').green + templatePath);
|
||||||
|
if (cb) cb();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue