Description
Bug Report or Feature Request (mark with an x
)
This is a feature request
Desired functionality
When generating a new app inside of a workspace, I would like to be able to nest the respective e2e project inside the new app.
Current structure: sibling e2e (ng generate application app2)
...
projects
-app2
-src
-app2-e2e
Desired structure: nested e2e
...
projects
-app2
-src
-e2e
Mention any other details that might be useful
Initially raised this as a feature request / PR in Nrwl's NX repo here: nrwl/nx#743
But it was determined that this is the appropriate place to raise this feature request.
Related question on SO here: https://stackoverflow.com/questions/51763075/why-does-nrwl-nx-create-a-separate-e2e-project-for-each-app/
Proposal
Add a new option to the ng generate application
schematic named nestE2e
(although naming things isn't exactly my specialty), which can be used to create a nested e2e project (as opposed to a sibling e2e project) for the newly generated app.
ng generate application my-app --nestE2e
Consideration
This would be helpful for working in a monorepo, or for working in an empty workspace (#12216). As more apps get generated, you wouldn't be left with 2x the number of folders cluttering (imo) the projects directory.
The desired structure above is also more familiar to people who work on standalone apps generated with ng new, in that e2e code is kept within the app directory.