@netbasal/testakita
Version:
Akita Schematics for Angular
20 lines • 977 B
JavaScript
;
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);
options.name = parsedPath.name;
options.path = parsedPath.path;
const templateSource = schematics_1.apply(schematics_1.url('./files'), [
options.spec ? schematics_1.noop() : schematics_1.filter(path => !path.endsWith('.spec.ts')),
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