index.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. "use strict";
  2. /**
  3. * @license
  4. * Copyright Google Inc. 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 codelyzer_5_1 = require("./codelyzer-5");
  13. const differential_loading_1 = require("./differential-loading");
  14. const drop_es6_polyfills_1 = require("./drop-es6-polyfills");
  15. const remove_angular_http_1 = require("./remove-angular-http");
  16. const update_dependencies_1 = require("./update-dependencies");
  17. var update_lazy_module_paths_1 = require("./update-lazy-module-paths");
  18. exports.updateLazyModulePaths = update_lazy_module_paths_1.updateLazyModulePaths;
  19. function default_1() {
  20. return () => {
  21. return schematics_1.chain([
  22. codelyzer_5_1.updateTsLintConfig(),
  23. codelyzer_5_1.updatePackageJson(),
  24. drop_es6_polyfills_1.dropES2015Polyfills(),
  25. differential_loading_1.updateES5Projects(),
  26. update_dependencies_1.updateDependencies(),
  27. remove_angular_http_1.removeAngularHttp(),
  28. (tree, context) => {
  29. const packageChanges = tree.actions.some(a => a.path.endsWith('/package.json'));
  30. if (packageChanges) {
  31. context.addTask(new tasks_1.NodePackageInstallTask());
  32. }
  33. },
  34. ]);
  35. };
  36. }
  37. exports.default = default_1;