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 * 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 { import {
MergeStrategy, MergeStrategy,
Rule, Rule,
@ -20,6 +20,7 @@ import {
move, move,
noop, noop,
schematic, schematic,
strings,
url, url,
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';

View File

@ -6,7 +6,6 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import { strings } from '@angular-devkit/core';
import { import {
FileOperator, FileOperator,
Rule, Rule,
@ -20,6 +19,7 @@ import {
mergeWith, mergeWith,
move, move,
noop, noop,
strings,
url, url,
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript'; 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 * found in the LICENSE file at https://angular.io/license
*/ */
import { strings } from '@angular-devkit/core';
import { import {
Rule, Rule,
SchematicsException, SchematicsException,
@ -18,6 +17,7 @@ import {
mergeWith, mergeWith,
move, move,
noop, noop,
strings,
url, url,
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript'; 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 * 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 { import {
Rule, Rule,
SchematicsException, SchematicsException,
@ -16,6 +16,7 @@ import {
chain, chain,
mergeWith, mergeWith,
move, move,
strings,
url, url,
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { NodeDependencyType, addPackageJsonDependency } from '../utility/dependencies'; import { NodeDependencyType, addPackageJsonDependency } from '../utility/dependencies';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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