File tree 2 files changed +8
-9
lines changed
packages/schematics/angular/application
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -247,17 +247,18 @@ export default function (options: ApplicationOptions): Rule {
247
247
248
248
const workspace = await getWorkspace ( host ) ;
249
249
const newProjectRoot = ( workspace . extensions . newProjectRoot as string | undefined ) || '' ;
250
- const isRootApp = options . projectRoot !== undefined ;
251
250
252
251
// If scoped project (i.e. "@foo/bar"), convert dir to "foo/bar".
253
252
let folderName = options . name . startsWith ( '@' ) ? options . name . slice ( 1 ) : options . name ;
254
253
if ( / [ A - Z ] / . test ( folderName ) ) {
255
254
folderName = strings . dasherize ( folderName ) ;
256
255
}
257
256
258
- const appDir = isRootApp
259
- ? normalize ( options . projectRoot || '' )
260
- : join ( normalize ( newProjectRoot ) , folderName ) ;
257
+ const appDir =
258
+ options . projectRoot === undefined
259
+ ? join ( normalize ( newProjectRoot ) , folderName )
260
+ : normalize ( options . projectRoot ) ;
261
+
261
262
const sourceDir = `${ appDir } /src/app` ;
262
263
263
264
return chain ( [
@@ -270,7 +271,6 @@ export default function (options: ApplicationOptions): Rule {
270
271
...options ,
271
272
relativePathToWorkspaceRoot : relativePathToWorkspaceRoot ( appDir ) ,
272
273
appName : options . name ,
273
- isRootApp,
274
274
folderName,
275
275
} ) ,
276
276
move ( appDir ) ,
Original file line number Diff line number Diff line change 7
7
"additionalProperties" : false ,
8
8
"properties" : {
9
9
"projectRoot" : {
10
- "description" : " The root directory of the new app." ,
11
- "type" : " string" ,
12
- "visible" : false
10
+ "description" : " The root directory of the new application." ,
11
+ "type" : " string"
13
12
},
14
13
"name" : {
15
- "description" : " The name of the new app ." ,
14
+ "description" : " The name of the new application ." ,
16
15
"type" : " string" ,
17
16
"pattern" : " ^(?:@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*/)?[a-zA-Z0-9-~][a-zA-Z0-9-._~]*$" ,
18
17
"$default" : {
You can’t perform that action at this time.
0 commit comments