Skip to content
This repository was archived by the owner on Sep 30, 2018. It is now read-only.

[Question]: how about generating outside default blueprint dir? #1

Closed
danielpiedra opened this issue Feb 5, 2018 · 2 comments
Closed

Comments

@danielpiedra
Copy link

@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!

@tomastrajan
Copy link
Member

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!

@danielpiedra
Copy link
Author

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants