[Question]: how about generating outside default blueprint dir?
danielpiedra opened this issue · comments
@tomastrajan I am new to schematics world and I am wondering if there's a way to generate my feature modules outside the default blueprint "src/app" of angular cli without having to create a 'copy' of default schematics to generate in a different location...
thanks in advance!
Hi @danielpiedra !
First of all this is not a official repository just my future efforts to create more schematics so that it doesn't create confusion.
For your question, there is a issue about this in angular cli
repo.
It looks like you can customize root
and appRoot
, properties in angular-cli.json
so that you can support different folders than src/app
but that's for all cases. Don't know if its possible to generate in src/app
by default and only generate elsewhere on demand.
Cheers!
Hey @tomastrajan, no confusion there! hope you can forgive my intrusive question above, I couldn't find a clear source so when I found this repo I thought I may ask you.
Furthermore, thanks for the tips on "appRoot", that was the part of the puzzle I was missing.
I was able to make it work for my requirements by just setting "appRoot": "."
, now the generate command takes a relative path from "src"
which is just what i wanted. e.g "ng g m test"
=> generates test module under src while "ng g m app/test"
will generate it under the app directory.
Cheers!