File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 6
6
createBuilder ,
7
7
targetFromTargetString ,
8
8
} from '@angular-devkit/architect' ;
9
- import type { JsonObject } from '@angular-devkit/core' ;
10
- import { dasherize } from '@angular-devkit/core/src/utils/strings' ;
9
+ import { type JsonObject , strings } from '@angular-devkit/core' ;
11
10
12
11
/**
13
12
* Converts the options object back to an argv string array.
@@ -40,7 +39,7 @@ function buildArgs(options: JsonObject): string[] {
40
39
41
40
// options automatically got converted to camelCase, so we have to convert them back to kebab-case for Playwright.
42
41
const dashes = key . length === 1 ? '-' : '--' ;
43
- const argument = `${ dashes } ${ dasherize ( key ) } ` ;
42
+ const argument = `${ dashes } ${ strings . dasherize ( key ) } ` ;
44
43
45
44
if ( typeof value === 'boolean' ) {
46
45
if ( value ) {
Original file line number Diff line number Diff line change 1
- import { classify , dasherize } from '@angular-devkit/core/src/utils/strings ' ;
1
+ import { strings } from '@angular-devkit/core' ;
2
2
import {
3
3
url ,
4
4
type Rule ,
@@ -14,10 +14,13 @@ import {
14
14
// You don't have to export the function as default. You can also have more than one rule factory
15
15
// per file.
16
16
export default function e2e ( options : { name : string } ) : Rule {
17
- const name = options . name ;
18
17
return ( tree : Tree , _context : SchematicContext ) => {
19
18
const templateSource = apply ( url ( './files' ) , [
20
- applyTemplates ( { classify, name, dasherize } ) ,
19
+ applyTemplates ( {
20
+ classify : strings . classify ,
21
+ name : options . name ,
22
+ dasherize : strings . dasherize ,
23
+ } ) ,
21
24
move ( 'e2e' ) ,
22
25
] ) ;
23
26
You can’t perform that action at this time.
0 commit comments