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 | */
|
---|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
10 | const schematics_1 = require("@angular-devkit/schematics");
|
---|
11 | const tasks_1 = require("@angular-devkit/schematics/tasks");
|
---|
12 | const add_tslib_1 = require("./add-tslib");
|
---|
13 | const ivy_libraries_1 = require("./ivy-libraries");
|
---|
14 | const ngsw_config_1 = require("./ngsw-config");
|
---|
15 | const remove_tsickle_1 = require("./remove-tsickle");
|
---|
16 | const update_app_tsconfigs_1 = require("./update-app-tsconfigs");
|
---|
17 | const update_dependencies_1 = require("./update-dependencies");
|
---|
18 | const update_i18n_1 = require("./update-i18n");
|
---|
19 | const update_server_main_file_1 = require("./update-server-main-file");
|
---|
20 | const update_workspace_config_1 = require("./update-workspace-config");
|
---|
21 | function default_1() {
|
---|
22 | return () => {
|
---|
23 | return schematics_1.chain([
|
---|
24 | update_workspace_config_1.updateWorkspaceConfig(),
|
---|
25 | update_i18n_1.updateI18nConfig(),
|
---|
26 | ivy_libraries_1.updateLibraries(),
|
---|
27 | ngsw_config_1.updateNGSWConfig(),
|
---|
28 | update_app_tsconfigs_1.updateApplicationTsConfigs(),
|
---|
29 | update_dependencies_1.updateDependencies(),
|
---|
30 | update_server_main_file_1.updateServerMainFile(),
|
---|
31 | remove_tsickle_1.removeTsickle(),
|
---|
32 | add_tslib_1.addTsLib(),
|
---|
33 | (tree, context) => {
|
---|
34 | const packageChanges = tree.actions.some((a) => a.path.endsWith('/package.json'));
|
---|
35 | if (packageChanges) {
|
---|
36 | context.addTask(new tasks_1.NodePackageInstallTask());
|
---|
37 | }
|
---|
38 | },
|
---|
39 | ]);
|
---|
40 | };
|
---|
41 | }
|
---|
42 | exports.default = default_1;
|
---|