update
This commit is contained in:
@ -0,0 +1 @@
|
||||
export * from './smartscaf.classes.smartscaf'
|
||||
|
43
ts/smartscaf.classes.smartscaf.ts
Normal file
43
ts/smartscaf.classes.smartscaf.ts
Normal 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
0
ts/smartscaf.helpers.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import * as smartfile from 'smartfile'
|
||||
import * as smarthbs from 'smarthbs'
|
||||
import * as smartq from 'smartq'
|
||||
|
||||
export {
|
||||
smartfile,
|
||||
smarthbs,
|
||||
smartq
|
||||
}
|
||||
|
Reference in New Issue
Block a user