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

1
dist/index.d.ts vendored Normal file
View File

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

7
dist/index.js vendored Normal file
View File

@@ -0,0 +1,7 @@
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./smartscaf.classes.smartscaf"));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLG1EQUE2QyJ9

26
dist/smartscaf.classes.smartscaf.d.ts vendored Normal file
View File

@@ -0,0 +1,26 @@
import { Smartfile } from 'smartfile';
export interface ScafTemplateContructorOptions {
name?: string;
description?: string;
sourceDir?: string;
}
export declare class ScafTemplate {
name: string;
description: string;
templateObject: Smartfile[];
requiredVariables: any[];
constructor();
/**
* read a template from a directory
*/
readTemplateFromDir(dirArg: string): Promise<void>;
writeWithVariables(variablesArg: any): Promise<void>;
/**
* finds all variables in a Template
*/
private _findVariablesInTemplate();
/**
* checks if supplied Variables satisfy the template
*/
private _checkSuppliedVariables(variablesArg);
}

43
dist/smartscaf.classes.smartscaf.js vendored Normal file
View File

@@ -0,0 +1,43 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./smartscaf.plugins");
class ScafTemplate {
constructor() { }
/**
* read a template from a directory
*/
readTemplateFromDir(dirArg) {
return __awaiter(this, void 0, void 0, function* () {
this.templateObject = yield plugins.smartfile.fs.fileTreeToObject(dirArg, '**/*');
});
}
writeWithVariables(variablesArg) {
return __awaiter(this, void 0, void 0, function* () {
yield this._checkSuppliedVariables(variablesArg);
});
}
/**
* finds all variables in a Template
*/
_findVariablesInTemplate() {
return __awaiter(this, void 0, void 0, function* () {
});
}
/**
* checks if supplied Variables satisfy the template
*/
_checkSuppliedVariables(variablesArg) {
return __awaiter(this, void 0, void 0, function* () {
});
}
}
exports.ScafTemplate = ScafTemplate;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzY2FmLmNsYXNzZXMuc21hcnRzY2FmLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzY2FmLmNsYXNzZXMuc21hcnRzY2FmLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwrQ0FBOEM7QUFXOUM7SUFLRSxnQkFBZSxDQUFDO0lBRWhCOztPQUVHO0lBQ0csbUJBQW1CLENBQUUsTUFBYzs7WUFDdkMsSUFBSSxDQUFDLGNBQWMsR0FBRyxNQUFNLE9BQU8sQ0FBQyxTQUFTLENBQUMsRUFBRSxDQUFDLGdCQUFnQixDQUFDLE1BQU0sRUFBRSxNQUFNLENBQUMsQ0FBQTtRQUNuRixDQUFDO0tBQUE7SUFFSyxrQkFBa0IsQ0FBRSxZQUFZOztZQUNwQyxNQUFNLElBQUksQ0FBQyx1QkFBdUIsQ0FBQyxZQUFZLENBQUMsQ0FBQTtRQUNsRCxDQUFDO0tBQUE7SUFFRDs7T0FFRztJQUNXLHdCQUF3Qjs7UUFFdEMsQ0FBQztLQUFBO0lBRUQ7O09BRUc7SUFDVyx1QkFBdUIsQ0FBRSxZQUFZOztRQUVuRCxDQUFDO0tBQUE7Q0FDRjtBQS9CRCxvQ0ErQkMifQ==

0
dist/smartscaf.helpers.d.ts vendored Normal file
View File

1
dist/smartscaf.helpers.js vendored Normal file
View File

@@ -0,0 +1 @@
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzY2FmLmhlbHBlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHNjYWYuaGVscGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=

4
dist/smartscaf.plugins.d.ts vendored Normal file
View File

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

9
dist/smartscaf.plugins.js vendored Normal file
View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const smartfile = require("smartfile");
exports.smartfile = smartfile;
const smarthbs = require("smarthbs");
exports.smarthbs = smarthbs;
const smartq = require("smartq");
exports.smartq = smartq;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzY2FmLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHNjYWYucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHVDQUFzQztBQUtwQyw4QkFBUztBQUpYLHFDQUFvQztBQUtsQyw0QkFBUTtBQUpWLGlDQUFnQztBQUs5Qix3QkFBTSJ9