UNPKG

1.26 kBJavaScriptView Raw
1"use strict";
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9Object.defineProperty(exports, "__esModule", { value: true });
10const core_1 = require("@angular-devkit/core");
11const schematics_1 = require("@angular-devkit/schematics");
12const tasks_1 = require("@angular-devkit/schematics/tasks");
13function default_1(options) {
14 const schematicsVersion = require('@angular-devkit/schematics/package.json').version;
15 const coreVersion = require('@angular-devkit/core/package.json').version;
16 return (_, context) => {
17 context.addTask(new tasks_1.NodePackageInstallTask(options.name));
18 return (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
19 (0, schematics_1.partitionApplyMerge)((p) => !/\/src\/.*?\/files\//.test(p), (0, schematics_1.template)({
20 ...options,
21 coreVersion,
22 schematicsVersion,
23 dot: '.',
24 dasherize: core_1.strings.dasherize,
25 })),
26 (0, schematics_1.move)(options.name),
27 ]));
28 };
29}
30exports.default = default_1;