File tree Expand file tree Collapse file tree
packages/schematics/angular Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9595 "format" : " path" ,
9696 "description" : " The path of the source directory." ,
9797 "default" : " src" ,
98- "alias" : " sd "
98+ "alias" : " D "
9999 }
100100 },
101101 "required" : [
Original file line number Diff line number Diff line change @@ -114,4 +114,10 @@ describe('Application Schematic', () => {
114114 const content = tree . readContent ( path ) ;
115115 expect ( content ) . toMatch ( / i m p o r t { A p p C o m p o n e n t } f r o m \' \. \/ a p p \. c o m p o n e n t \' ; / ) ;
116116 } ) ;
117+
118+ it ( 'should use the directory option' , ( ) => {
119+ const options = { ...defaultOptions , directory : 'my-dir' } ;
120+ const tree = schematicRunner . runSchematic ( 'application' , options ) ;
121+ expect ( tree . exists ( '/my-dir/package.json' ) ) . toEqual ( true ) ;
122+ } ) ;
117123} ) ;
Original file line number Diff line number Diff line change 77 "directory" : {
88 "type" : " string" ,
99 "format" : " path" ,
10- "description" : " The directory name to create the app in." ,
11- "alias" : " dir"
10+ "description" : " The directory name to create the app in."
1211 },
1312 "path" : {
1413 "type" : " string" ,
2221 "format" : " path" ,
2322 "description" : " The path of the source directory." ,
2423 "default" : " src" ,
25- "alias" : " sd " ,
24+ "alias" : " D " ,
2625 "visible" : false
2726 },
2827 "name" : {
3433 "description" : " Specifies if the style will be in the ts file." ,
3534 "type" : " boolean" ,
3635 "default" : false ,
37- "alias" : " is "
36+ "alias" : " s "
3837 },
3938 "inlineTemplate" : {
4039 "description" : " Specifies if the template will be in the ts file." ,
4140 "type" : " boolean" ,
4241 "default" : false ,
43- "alias" : " it "
42+ "alias" : " t "
4443 },
4544 "viewEncapsulation" : {
4645 "description" : " Specifies the view encapsulation strategy." ,
7372 "description" : " Skip creating spec files." ,
7473 "type" : " boolean" ,
7574 "default" : false ,
76- "alias" : " st "
75+ "alias" : " S "
7776 },
7877 "skipInstall" : {
7978 "description" : " Skip installing dependency packages." ,
9089 "description" : " Skip initializing a git repository." ,
9190 "type" : " boolean" ,
9291 "default" : false ,
93- "alias" : " sg "
92+ "alias" : " g "
9493 },
9594 "commit" : {
9695 "description" : " Initial repository commit information." ,
Original file line number Diff line number Diff line change 1616 "format" : " path" ,
1717 "description" : " The path of the source directory." ,
1818 "default" : " src" ,
19- "alias" : " sd " ,
19+ "alias" : " D " ,
2020 "visible" : false
2121 },
2222 "appRoot" : {
3333 "description" : " Specifies if the style will be in the ts file." ,
3434 "type" : " boolean" ,
3535 "default" : false ,
36- "alias" : " is "
36+ "alias" : " s "
3737 },
3838 "inlineTemplate" : {
3939 "description" : " Specifies if the template will be in the ts file." ,
4040 "type" : " boolean" ,
4141 "default" : false ,
42- "alias" : " it "
42+ "alias" : " t "
4343 },
4444 "viewEncapsulation" : {
4545 "description" : " Specifies the view encapsulation strategy." ,
4646 "enum" : [" Emulated" , " Native" , " None" ],
4747 "type" : " string" ,
48- "alias" : " ve "
48+ "alias" : " v "
4949 },
5050 "changeDetection" : {
5151 "description" : " Specifies the change detection strategy." ,
5252 "enum" : [" Default" , " OnPush" ],
5353 "type" : " string" ,
5454 "default" : " Default" ,
55- "alias" : " cd "
55+ "alias" : " c "
5656 },
5757 "prefix" : {
5858 "type" : " string" ,
Original file line number Diff line number Diff line change 8181 "format" : " path" ,
8282 "description" : " The path of the source directory." ,
8383 "default" : " src" ,
84- "alias" : " sd "
84+ "alias" : " D "
8585 }
8686 },
8787 "required" : [
You can’t perform that action at this time.
0 commit comments