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

Consistent Behavior: support --project, treat first arg as --name #17

Open
xmlking opened this issue Dec 1, 2018 · 2 comments
Open

Comments

@xmlking
Copy link

xmlking commented Dec 1, 2018

  1. in monorepo setup, when --project is provided, schematics should derive sourceRoot and projectType from angular.json for that project.
ng g @ngxs/schematics:store --name=store/auth --spec --project=auth  -d

should generate:

CREATE libs/auth/src/libs/store/auth/auth.actions.ts
CREATE libs/auth/src/libs/store/auth/auth.state.spec.ts
CREATE libs/auth/src/libs/store/auth/auth.state.ts 

Workaround

ng g @ngxs/schematics:store --name=store/auth --spec --project=auth  --sourceRoot=libs/auth/src/libs -d
  1. when --name consists path, it should not add extra path prefix. i.e., store/auth/auth.actions.ts -> store/auth.actions.ts
ng g @ngxs/schematics:store --name=store/auth --spec --project=auth  -d

should generate

CREATE libs/auth/src/libs/store/auth.actions.ts 
CREATE libs/auth/src/libs/store/auth.state.spec.ts 
CREATE libs/auth/src/libs/store/auth.state.ts
  1. when --name is not provided, first arg should be treated as --name
ng g @ngxs/schematics:store store/auth --spec --project=auth  -d
  1. --spec=true should be default. if users don't need spec , they can provide --spec=false
@markwhitfeld
Copy link
Member

All of these sound right to me

@xmlking
Copy link
Author

xmlking commented May 26, 2019

@markwhitfeld any update on this ?

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

2 participants