UNPKG

1.23 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3/**
4 * @license
5 * Copyright Google LLC All Rights Reserved.
6 *
7 * Use of this source code is governed by an MIT-style license that can be
8 * found in the LICENSE file at https://angular.io/license
9 */
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 schematics_1.mergeWith(schematics_1.apply(schematics_1.url('./files'), [
19 schematics_1.partitionApplyMerge((p) => !/\/src\/.*?\/files\//.test(p), schematics_1.template({
20 ...options,
21 coreVersion,
22 schematicsVersion,
23 dot: '.',
24 dasherize: core_1.strings.dasherize,
25 })),
26 schematics_1.move(options.name),
27 ]));
28 };
29}
30exports.default = default_1;