Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs to support the flat flag #28

Open
markwhitfeld opened this issue Feb 13, 2019 · 0 comments
Open

Needs to support the flat flag #28

markwhitfeld opened this issue Feb 13, 2019 · 0 comments

Comments

@markwhitfeld
Copy link
Member

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[ ] Support request => https://github.com/ngxs/store/blob/master/CONTRIBUTING.md
[ ] Other... Please describe:

Current behavior

Currently the store, state and actions schematics generate within a folder named after the name provided.
For example, ng generate @ngxs/schematics:store sample --path=app/src/sample/store generates:

src/app/src/sample/store/sample/sample.actions.ts
src/app/src/sample/store/sample/sample.state.spec.ts
src/app/src/sample/store/sample/sample.state.ts

It does not allow me to generate these files directly into the app/src/sample/store folder but always creates the subfolder.

Expected behavior

I would like to be able to specify --flat=true to generate the files directly into the target.
For example, ng generate @ngxs/schematics:store sample --path=app/src/sample/store --flat=true would generate:

src/app/src/sample/store/sample.actions.ts
src/app/src/sample/store/sample.state.spec.ts
src/app/src/sample/store/sample.state.ts

What is the motivation / use case for changing the behavior?

Not to force a directory structure on the user and to align with an option available in @angular/schematics.

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

No branches or pull requests

1 participant