mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 20:02:40 +08:00
1. Remove imports of es6 polyfills introduced by the CLI. 2. Refactor the migrations for version 8 by moving the codelyzer and polyfill transforms into different files. The PR drops all `core-js/es6` polyfills that we've introduced with the CLI, except the commented ones. We do not remove commented imports, since they are not part of the internal es6 polyfills. The migration automatically drops the associated comments with the removed imports since they are part of the node - under its `jsDoc` property.
25 lines
568 B
TypeScript
25 lines
568 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
import {
|
|
Rule,
|
|
chain,
|
|
} from '@angular-devkit/schematics';
|
|
import { updatePackageJson, updateTsLintConfig } from './codelyzer-5';
|
|
import { dropES2015Polyfills } from './drop-es6-polyfills';
|
|
|
|
export default function(): Rule {
|
|
return () => {
|
|
return chain([
|
|
updateTsLintConfig(),
|
|
updatePackageJson(),
|
|
dropES2015Polyfills(),
|
|
]);
|
|
};
|
|
}
|