This commit is contained in:
2017-04-29 00:44:23 +02:00
parent 3934a3a0da
commit 2de09cc7b9
17 changed files with 821 additions and 1 deletions

View File

@ -0,0 +1 @@
export * from './smartscaf.classes.smartscaf'

View File

@ -0,0 +1,43 @@
import * as plugins from './smartscaf.plugins'
// interfaces
import { Smartfile } from 'smartfile'
export interface ScafTemplateContructorOptions {
name?: string,
description?: string
sourceDir?: string
}
export class ScafTemplate {
name: string
description: string
templateObject: Smartfile[]
requiredVariables: any[]
constructor() {}
/**
* read a template from a directory
*/
async readTemplateFromDir (dirArg: string) {
this.templateObject = await plugins.smartfile.fs.fileTreeToObject(dirArg, '**/*')
}
async writeWithVariables (variablesArg) {
await this._checkSuppliedVariables(variablesArg)
}
/**
* finds all variables in a Template
*/
private async _findVariablesInTemplate () {
}
/**
* checks if supplied Variables satisfy the template
*/
private async _checkSuppliedVariables (variablesArg) {
}
}

0
ts/smartscaf.helpers.ts Normal file
View File

View File

@ -0,0 +1,9 @@
import * as smartfile from 'smartfile'
import * as smarthbs from 'smarthbs'
import * as smartq from 'smartq'
export {
smartfile,
smarthbs,
smartq
}