refactor(@schematics/angular): use string helper re-export from @angular-devkit/schematics

By using the `strings` re-export from `@angular-devkit/schematics` instead of from `@angular-devkit/core`,
the number of imports from `@angular-devkit/core` has been reduced and lowers the direct dependency count
for many of the individual schematics.
This commit is contained in:
Charles Lyding 2022-04-20 10:58:57 -04:00 committed by Charles
parent 25498ad5b2
commit 291bbffcc9
11 changed files with 17 additions and 11 deletions

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import { JsonObject, join, normalize, strings } from '@angular-devkit/core';
import { JsonObject, join, normalize } from '@angular-devkit/core';
import {
MergeStrategy,
Rule,
@ -20,6 +20,7 @@ import {
move,
noop,
schematic,
strings,
url,
} from '@angular-devkit/schematics';
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';

View File

@ -6,7 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
import { strings } from '@angular-devkit/core';
import {
FileOperator,
Rule,
@ -20,6 +19,7 @@ import {
mergeWith,
move,
noop,
strings,
url,
} from '@angular-devkit/schematics';
import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript';

View File

@ -6,7 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
import { strings } from '@angular-devkit/core';
import {
Rule,
SchematicsException,
@ -18,6 +17,7 @@ import {
mergeWith,
move,
noop,
strings,
url,
} from '@angular-devkit/schematics';
import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript';

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import { join, normalize, strings } from '@angular-devkit/core';
import { join, normalize } from '@angular-devkit/core';
import {
Rule,
SchematicsException,
@ -16,6 +16,7 @@ import {
chain,
mergeWith,
move,
strings,
url,
} from '@angular-devkit/schematics';
import { NodeDependencyType, addPackageJsonDependency } from '../utility/dependencies';

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import { join, normalize, strings } from '@angular-devkit/core';
import { join, normalize } from '@angular-devkit/core';
import {
Rule,
SchematicContext,
@ -18,6 +18,7 @@ import {
move,
noop,
schematic,
strings,
url,
} from '@angular-devkit/schematics';
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import { Path, normalize, strings } from '@angular-devkit/core';
import { Path, normalize } from '@angular-devkit/core';
import {
Rule,
SchematicsException,
@ -19,6 +19,7 @@ import {
move,
noop,
schematic,
strings,
url,
} from '@angular-devkit/schematics';
import { Schema as ComponentOptions } from '../component/schema';

View File

@ -6,7 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
import { strings } from '@angular-devkit/core';
import {
Rule,
SchematicsException,
@ -18,6 +17,7 @@ import {
mergeWith,
move,
noop,
strings,
url,
} from '@angular-devkit/schematics';
import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript';

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import { JsonValue, Path, basename, join, normalize, strings } from '@angular-devkit/core';
import { JsonValue, Path, basename, join, normalize } from '@angular-devkit/core';
import {
Rule,
SchematicContext,
@ -17,6 +17,7 @@ import {
chain,
mergeWith,
move,
strings,
url,
} from '@angular-devkit/schematics';
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';

View File

@ -6,7 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
import { strings } from '@angular-devkit/core';
import {
Rule,
Tree,
@ -17,6 +16,7 @@ import {
mergeWith,
move,
noop,
strings,
url,
} from '@angular-devkit/schematics';
import { parseName } from './parse-name';

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import { join, normalize, strings, tags } from '@angular-devkit/core';
import { join, normalize, tags } from '@angular-devkit/core';
import {
Rule,
SchematicContext,
@ -18,6 +18,7 @@ import {
mergeWith,
move,
noop,
strings,
url,
} from '@angular-devkit/schematics';
import { parseName } from '../utility/parse-name';

View File

@ -6,7 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
import { strings } from '@angular-devkit/core';
import {
Rule,
apply,
@ -14,6 +13,7 @@ import {
filter,
mergeWith,
noop,
strings,
url,
} from '@angular-devkit/schematics';
import { latestVersions } from '../utility/latest-versions';