UNPKG

@datorama/akita

Version:

State Management Tailored-Made for JS Applications

20 lines 935 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const schematics_1 = require("@angular-devkit/schematics"); const utils_1 = require("../utils"); function default_1(options) { return (host, context) => { options.path = utils_1.getProjectPath(host, options); const parsedPath = utils_1.parseName(options); parsedPath.path = parsedPath.path.replace('state', ''); options.name = parsedPath.name; options.path = parsedPath.path; const templateSource = schematics_1.apply(schematics_1.url('./files'), [ schematics_1.template(Object.assign({}, utils_1.stringUtils, options)), schematics_1.move(parsedPath.path) ]); return schematics_1.chain([schematics_1.branchAndMerge(schematics_1.chain([schematics_1.mergeWith(templateSource)]))])(host, context); }; } exports.default = default_1; //# sourceMappingURL=index.js.map