Skip to content

Commit

Permalink
fix(@schematics/angular): generate application with projectRoot is pr…
Browse files Browse the repository at this point in the history
…ovided
  • Loading branch information
vovikdrg committed Aug 17, 2018
1 parent 53684fe commit 62d0728
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 9 additions & 0 deletions docs/documentation/generate/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,12 @@ Create an Angular application.
Do not add dependencies to package.json.
</p>
</details>
<details>
<summary>project-root</summary>
<p>
<code>--project-root</code>
</p>
<p>
Specify root folder for new application and e2e tests
</p>
</details>
2 changes: 1 addition & 1 deletion docs/documentation/stories/multiple-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To create another app you can use the following command:
ng generate application my-other-app
```

The new application will be generated inside `projects/my-other-app`.
The new application will be generated inside `projects/my-other-app`. If you wish to override root folder specify `--project-root applicationPath`

Now we can `serve`, `build` etc. both the apps by passing the project name with the commands:

Expand Down
4 changes: 1 addition & 3 deletions packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,8 @@ export default function (options: ApplicationOptions): Rule {
name: `${options.name}-e2e`,
relatedAppName: options.name,
rootSelector: appRootSelector,
projectRoot: `${newProjectRoot}/e2e`,
};
if (options.projectRoot !== undefined) {
e2eOptions.projectRoot = 'e2e';
}

return chain([
addAppToWorkspaceFile(options, workspace),
Expand Down

0 comments on commit 62d0728

Please sign in to comment.