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

View File

@ -0,0 +1,2 @@
import * as plugins from './smartscaf.plugins'

View File

@ -3,6 +3,7 @@ import * as lodash from 'lodash'
import * as path from 'path'
import * as smartfile from 'smartfile'
import * as smarthbs from 'smarthbs'
import * as smartinteract from 'smartinteract'
import * as smartq from 'smartq'
export {
@ -10,5 +11,6 @@ export {
path,
smartfile,
smarthbs,
smartinteract,
smartq
}