@@ -13,34 +13,38 @@ export class NewCommand extends AbstractCommand {
13
13
. option (
14
14
'-d, --dry-run' ,
15
15
'Report actions that would be performed without writing out results.' ,
16
+ false
16
17
)
17
- . option ( '-g, --skip-git' , 'Skip git repository initialization.' )
18
- . option ( '-s, --skip-install' , 'Skip package installation.' )
18
+ . option ( '-g, --skip-git' , 'Skip git repository initialization.' , false )
19
+ . option ( '-s, --skip-install' , 'Skip package installation.' , false )
19
20
. option (
20
21
'-p, --package-manager [package-manager]' ,
21
- 'Specify package manager.' ,
22
+ 'Specify package manager.'
22
23
)
23
24
. option (
24
25
'-l, --language [language]' ,
25
- 'Programming language to be used (TypeScript or JavaScript).' ,
26
+ 'Programming language to be used (TypeScript or JavaScript)' ,
27
+ 'TypeScript' ,
26
28
)
27
29
. option (
28
30
'-c, --collection [collectionName]' ,
29
- 'Schematics collection to use.' ,
31
+ 'Schematics collection to use' ,
32
+ Collection . NESTJS ,
30
33
)
31
- . option ( '--strict' , 'Enables strict mode in TypeScript.' )
34
+ . option ( '--strict' , 'Enables strict mode in TypeScript.' , false )
32
35
. action ( async ( name : string , command : Command ) => {
33
36
const options : Input [ ] = [ ] ;
34
37
const availableLanguages = [ 'js' , 'ts' , 'javascript' , 'typescript' ] ;
35
38
options . push ( { name : 'directory' , value : command . directory } ) ;
36
- options . push ( { name : 'dry-run' , value : ! ! command . dryRun } ) ;
37
- options . push ( { name : 'skip-git' , value : ! ! command . skipGit } ) ;
38
- options . push ( { name : 'skip-install' , value : ! ! command . skipInstall } ) ;
39
- options . push ( { name : 'strict' , value : ! ! command . strict } ) ;
39
+ options . push ( { name : 'dry-run' , value : command . dryRun } ) ;
40
+ options . push ( { name : 'skip-git' , value : command . skipGit } ) ;
41
+ options . push ( { name : 'skip-install' , value : command . skipInstall } ) ;
42
+ options . push ( { name : 'strict' , value : command . strict } ) ;
40
43
options . push ( {
41
44
name : 'package-manager' ,
42
45
value : command . packageManager ,
43
46
} ) ;
47
+ options . push ( { name : 'collection' , value : command . collection } ) ;
44
48
45
49
if ( ! ! command . language ) {
46
50
const lowercasedLanguage = command . language . toLowerCase ( ) ;
@@ -64,11 +68,7 @@ export class NewCommand extends AbstractCommand {
64
68
}
65
69
options . push ( {
66
70
name : 'language' ,
67
- value : ! ! command . language ? command . language : 'ts' ,
68
- } ) ;
69
- options . push ( {
70
- name : 'collection' ,
71
- value : command . collection || Collection . NESTJS ,
71
+ value : command . language ,
72
72
} ) ;
73
73
74
74
const inputs : Input [ ] = [ ] ;
0 commit comments