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

ng g ngrx doesn't create all files #618

Closed
ternyk opened this issue Jul 4, 2018 · 2 comments · Fixed by #474
Closed

ng g ngrx doesn't create all files #618

ternyk opened this issue Jul 4, 2018 · 2 comments · Fixed by #474
Assignees

Comments

@ternyk
Copy link

ternyk commented Jul 4, 2018

Hi
There is something not clear regarding which files should be generated for ngrx.
Currently when I use that functionality, only actions, effects, reducer files are created but documentation says that also interfaces.ts and init.ts files should be. See: https://github.com/nrwl/nx/blob/68e34d494fdca1c57a757c889ea8105e8a0a7a6e/packages/schematics/src/collection/ngrx/ngrx.md

There is also merged PR: #386 which states:

...
generate init and interface files
...

but in the commit I can see that generation of these files was removed.

@ThomasBurleson ThomasBurleson self-assigned this Jul 4, 2018
@ternyk ternyk changed the title ngrx g ngrx doesn't create all files ng g ngrx doesn't create all files Jul 4, 2018
@ThomasBurleson
Copy link
Contributor

@ternyk - see our upcoming NgRx.md Schematics doc

@ThomasBurleson ThomasBurleson added this to the 6.2.0 milestone Jul 13, 2018
vsavkin pushed a commit that referenced this issue Jul 22, 2018
@nrwl/schematics no longer uses the @ngrx/schematics to generate NgRx feature files.
*  `ngrx/files/__directory__` templates are used
*  Templates replicate the simple outputs generated from @ngrx/schematics:feature
*  Templates add significant Nx enhancements.

The following standard files will be scaffolded:
* `<feature>.actions.ts`
* `<feature>.effects.ts` + `<feature>.effects.spec.ts`
* `<feature>.reducer.ts` + `<feature>.reducer.spec.ts`

The following new files will also be scaffolded:
* `<feature>.selectors.ts` +  `<feature>.selectors.spec.ts`

Changes include:

* Change the action/enums to generate a trio of enums for each *feature*: `Load<Feature>`, `<Feature>Loaded`, and `<Feature>LoadError`
* Add code generators for `<feature>.selectors.ts`
* Add code generators for unit and integration testing `*.spec.ts` files
* Update the public barrel [`index.ts`] when adding ngrx to a library
* Use `StoreModule.forFeature()` when adding ngrx feature (without using the `--root` option)
* Use the Effect to respond tp `load<Feature>$` and dispatch `<Feature>Loaded` or `<Feature>LoadError`
* Update the Action to export `<feature>Actions` map of all action classes
* fix `ng-add.test.ts` tests for latest Angular CLI scaffolding
* fix `application.spec.ts` expect fails

Fixes #472,  Fixes #618,  Fixes #317,  Fixes #561, Refs #380.
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants