Skip to content

Commit 291bbff

Browse files
committed
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.
1 parent 25498ad commit 291bbff

File tree

11 files changed

+17
-11
lines changed

11 files changed

+17
-11
lines changed

packages/schematics/angular/application/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { JsonObject, join, normalize, strings } from '@angular-devkit/core';
9+
import { JsonObject, join, normalize } from '@angular-devkit/core';
1010
import {
1111
MergeStrategy,
1212
Rule,
@@ -20,6 +20,7 @@ import {
2020
move,
2121
noop,
2222
schematic,
23+
strings,
2324
url,
2425
} from '@angular-devkit/schematics';
2526
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';

packages/schematics/angular/component/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { strings } from '@angular-devkit/core';
109
import {
1110
FileOperator,
1211
Rule,
@@ -20,6 +19,7 @@ import {
2019
mergeWith,
2120
move,
2221
noop,
22+
strings,
2323
url,
2424
} from '@angular-devkit/schematics';
2525
import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript';

packages/schematics/angular/directive/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { strings } from '@angular-devkit/core';
109
import {
1110
Rule,
1211
SchematicsException,
@@ -18,6 +17,7 @@ import {
1817
mergeWith,
1918
move,
2019
noop,
20+
strings,
2121
url,
2222
} from '@angular-devkit/schematics';
2323
import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript';

packages/schematics/angular/e2e/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { join, normalize, strings } from '@angular-devkit/core';
9+
import { join, normalize } from '@angular-devkit/core';
1010
import {
1111
Rule,
1212
SchematicsException,
@@ -16,6 +16,7 @@ import {
1616
chain,
1717
mergeWith,
1818
move,
19+
strings,
1920
url,
2021
} from '@angular-devkit/schematics';
2122
import { NodeDependencyType, addPackageJsonDependency } from '../utility/dependencies';

packages/schematics/angular/library/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { join, normalize, strings } from '@angular-devkit/core';
9+
import { join, normalize } from '@angular-devkit/core';
1010
import {
1111
Rule,
1212
SchematicContext,
@@ -18,6 +18,7 @@ import {
1818
move,
1919
noop,
2020
schematic,
21+
strings,
2122
url,
2223
} from '@angular-devkit/schematics';
2324
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';

packages/schematics/angular/module/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { Path, normalize, strings } from '@angular-devkit/core';
9+
import { Path, normalize } from '@angular-devkit/core';
1010
import {
1111
Rule,
1212
SchematicsException,
@@ -19,6 +19,7 @@ import {
1919
move,
2020
noop,
2121
schematic,
22+
strings,
2223
url,
2324
} from '@angular-devkit/schematics';
2425
import { Schema as ComponentOptions } from '../component/schema';

packages/schematics/angular/pipe/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { strings } from '@angular-devkit/core';
109
import {
1110
Rule,
1211
SchematicsException,
@@ -18,6 +17,7 @@ import {
1817
mergeWith,
1918
move,
2019
noop,
20+
strings,
2121
url,
2222
} from '@angular-devkit/schematics';
2323
import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript';

packages/schematics/angular/universal/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { JsonValue, Path, basename, join, normalize, strings } from '@angular-devkit/core';
9+
import { JsonValue, Path, basename, join, normalize } from '@angular-devkit/core';
1010
import {
1111
Rule,
1212
SchematicContext,
@@ -17,6 +17,7 @@ import {
1717
chain,
1818
mergeWith,
1919
move,
20+
strings,
2021
url,
2122
} from '@angular-devkit/schematics';
2223
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';

packages/schematics/angular/utility/generate-from-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { strings } from '@angular-devkit/core';
109
import {
1110
Rule,
1211
Tree,
@@ -17,6 +16,7 @@ import {
1716
mergeWith,
1817
move,
1918
noop,
19+
strings,
2020
url,
2121
} from '@angular-devkit/schematics';
2222
import { parseName } from './parse-name';

packages/schematics/angular/web-worker/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { join, normalize, strings, tags } from '@angular-devkit/core';
9+
import { join, normalize, tags } from '@angular-devkit/core';
1010
import {
1111
Rule,
1212
SchematicContext,
@@ -18,6 +18,7 @@ import {
1818
mergeWith,
1919
move,
2020
noop,
21+
strings,
2122
url,
2223
} from '@angular-devkit/schematics';
2324
import { parseName } from '../utility/parse-name';

0 commit comments

Comments
 (0)