start cli integration

This commit is contained in:
2017-05-06 00:47:27 +02:00
parent aa31bbfb49
commit c6bc044058
6 changed files with 377 additions and 14 deletions

View File

@@ -35,6 +35,14 @@ export class ScafTemplate {
this.missingVariables = await this._checkSuppliedVariables(variablesArg)
}
/**
* Will ask for the missing variables by cli interaction
*/
async askForMissingVariables () {
this.missingVariables = await this._checkSuppliedVariables(variablesArg)
}
/**
* finds all variables in a Template
*/
@@ -50,7 +58,6 @@ export class ScafTemplate {
private async _checkSuppliedVariables(variablesArg) {
let missingVars: string[] = []
for (let templateSmartFile of this.templateSmartfileArray) {
console.log(templateSmartFile)
let localMissingVars = await plugins.smarthbs.checkVarsSatisfaction(
templateSmartFile.contents.toString(),
variablesArg