x)- [ ] bug report -> please search issues before submitting
- [x] feature request
x)- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Latest
Currently It is not possible to generate a library within a specific folder with relative path.
When I run ng generate library mylib --prefix=mylib command, it generates a folder called projects under root directory and places mylib under projects
_Current Flow,_
|---MyFoodApplication
| |---projects
| |---mylib-1
| |---mylib-2
| |---src
_Sometimes use-case can be like:_
1) Create all libraries under common folder resides at (anywhere) angular project's root directory. (common is just a folder and nothing else)
2) When I want to create any library, It should create desire name of the folder (eg. companyname-libraries) which must contain all generated library.
_So, the final output should be like below,_
|---MyFoodApplication
| |---common
| |---companyname-libraries
| |---mylib-1
| |---mylib-2
| |---src
Obviously this isn't ideal, but I work around this issue by simply updating the angular.json "newProjectRoot" property to be whatever I want for the project I'm generating at that moment.
In general, I keep it at the project root for my libraries (because I generate more of those) and I temporarily change it to the project root for my apps when I need to generate a new app (and then immediately change it back to my libraries' project root).
@thefliik I have already done it but it should not be a manual process ! That's why I've added this as a feature request.
Most helpful comment
@thefliik I have already done it but it should not be a manual process ! That's why I've added this as a feature request.