16.1.0 • Published 3 months ago

ngrx-entity-crud v16.1.0

Weekly downloads
378
License
MIT
Repository
github
Last release
3 months ago

ngrx-entity-crud

This library helps create the CRUD Angular application that makes use of NgRx. Commands for code generation:

  • store: Generates a feature set containing an entity, actions, reducer, ... file.
  • section: Generates a new Angular CRUD page containing an list, detail, search, ... file.
  • auth: Generates a boilerplate for authentication implementation containing an store section and components file.
  • auth0: Generates Auth0 implementation containing an store section and components file.

How to use it?

To create your first project, follow this guide.

Command detail for generation

store


Overview

Generates a feature set containing an actions, effects, reducer, and selectors file. You use this to build out a new feature area that provides a new piece of state.

Command

ng generate ngrx-entity-crud:store  [options]

Options

Name of the store section

  • --name
    • Type: string
    • Default: false

Name of the class that will be managed

  • --clazz
    • Type: string
    • Default: false

Store type:

  • CRUD-PLURAL: generate action, effect and reducer for the crud management of the entity.
  • CRUD-SINGULAR: generate action, effect and reducer for the crud management of the entity.
  • CRUD+GRAPHQL: generate action, effect and reducer for the crud management of the entity.
  • BASE: generate an empty boilerplate

  • --type
    • Type: string
    • Enum: "CRUD-PLURAL", "CRUD-SINGULAR", "CRUD+GRAPHQL", "BASE"
    • Default: false

Examples

ng generate ngrx-entity-crud:store --name=coin --clazz=Coin --type=CRUD-PLURAL
CREATE src/app/main/models/vo/coin.ts (221 bytes)
CREATE src/app/root-store/coin-store/coin-store.module.ts (807 bytes)
CREATE src/app/root-store/coin-store/coin.actions.ts (779 bytes)
CREATE src/app/root-store/coin-store/coin.effects.ts (3184 bytes)
CREATE src/app/root-store/coin-store/coin.names.ts (46 bytes)
CREATE src/app/root-store/coin-store/coin.reducer.ts (2045 bytes)
CREATE src/app/root-store/coin-store/coin.selectors.ts (673 bytes)
CREATE src/app/root-store/coin-store/coin.state.ts (385 bytes)
CREATE src/app/root-store/coin-store/index.d.ts (282 bytes)
CREATE src/app/root-store/coin-store/index.ts (284 bytes)
CREATE src/app/main/services/coin.service.ts (344 bytes)

UPDATE src/app/root-store/index.ts (309 bytes)
UPDATE src/app/root-store/index.d.ts (309 bytes)
UPDATE src/app/root-store/state.ts (217 bytes)
UPDATE src/app/root-store/selectors.ts (665 bytes)
UPDATE src/app/root-store/root-store.module.ts (1051 bytes)
ng generate ngrx-entity-crud:store --name=coin --clazz=Coin --type=CRUD-SINGULAR
CREATE src/app/main/models/vo/coin.ts (221 bytes)
CREATE src/app/root-store/coin-store/coin-store.module.ts (827 bytes)
CREATE src/app/root-store/coin-store/coin.actions.ts (524 bytes)
CREATE src/app/root-store/coin-store/coin.effects.ts (1470 bytes)
CREATE src/app/root-store/coin-store/coin.names.ts (46 bytes)
CREATE src/app/root-store/coin-store/coin.reducer.ts (1015 bytes)
CREATE src/app/root-store/coin-store/coin.selectors.ts (516 bytes)
CREATE src/app/root-store/coin-store/coin.state.ts (257 bytes)
CREATE src/app/root-store/coin-store/index.d.ts (282 bytes)
CREATE src/app/root-store/coin-store/index.ts (282 bytes)
CREATE src/app/main/services/coin.service.ts (360 bytes)

UPDATE src/app/root-store/index.ts (309 bytes)
UPDATE src/app/root-store/index.d.ts (309 bytes)
UPDATE src/app/root-store/state.ts (217 bytes)
UPDATE src/app/root-store/selectors.ts (665 bytes)
UPDATE src/app/root-store/root-store.module.ts (1051 bytes)
ng generate ngrx-entity-crud:store --name=coin --clazz=Coin --type=CRUD+GRAPHQL
ng generate ngrx-entity-crud:store --name=coin --clazz=Coin --type=BASE
CREATE src/app/root-store/coin-store/coin-store.module.ts (807 bytes)
CREATE src/app/root-store/coin-store/coin.actions.ts (319 bytes)
CREATE src/app/root-store/coin-store/coin.effects.ts (190 bytes)
CREATE src/app/root-store/coin-store/coin.names.ts (46 bytes)
CREATE src/app/root-store/coin-store/coin.reducer.ts (337 bytes)
CREATE src/app/root-store/coin-store/coin.selectors.ts (593 bytes)
CREATE src/app/root-store/coin-store/coin.state.ts (116 bytes)
CREATE src/app/root-store/coin-store/index.d.ts (282 bytes)
CREATE src/app/root-store/coin-store/index.ts (282 bytes)
CREATE src/app/main/models/vo/coin.ts (137 bytes)

UPDATE src/app/root-store/index.ts (309 bytes)
UPDATE src/app/root-store/index.d.ts (309 bytes)
UPDATE src/app/root-store/state.ts (184 bytes)
UPDATE src/app/root-store/root-store.module.ts (1051 bytes)

Files generated/changed by the “:store” command

section


Overview

Generates a new Angular CRUD page containing an table, detail, search, reactive form, ... file.

Command

ng generate ngrx-entity-crud:section  [options]

Options

Name of the class that will be managed

  • --clazz
    • Type: string
    • Default: false

Allows you to decide whether to use the graphic components of PrimeNg, or to create an empty boilerplate

  • --lib
    • Type: string
    • Enum: "primeng" or "no-libs"
    • Default: true

Examples

ng generate ngrx-entity-crud:section --clazz=Coin --lib=primeng

or

ng generate ngrx-entity-crud:section --clazz=Coin --lib=no-libs

Files generated/changed by the “:section” command

CREATE src/app/main/views/coin/coin-routing.module.ts (722 bytes)
CREATE src/app/main/views/coin/coin.module.ts (1102 bytes)
CREATE src/app/main/views/coin/coin-edit/coin-edit.component.html (1325 bytes)
CREATE src/app/main/views/coin/coin-edit/coin-edit.component.ts (1626 bytes)
CREATE src/app/main/views/coin/coin-list/coin-list.component.html (706 bytes)
CREATE src/app/main/views/coin/coin-list/coin-list.component.ts (2254 bytes)
CREATE src/app/main/views/coin/coin-main/coin-main.component.html (188 bytes)
CREATE src/app/main/views/coin/coin-main/coin-main.component.ts (536 bytes)

UPDATE src/app/app-routing.module.ts (517 bytes)

auth


Overview

Generates a boilerplate for authentication implementation containing an store section and components file.

Command

ng generate ngrx-entity-crud:auth

Examples

ng generate ngrx-entity-crud:auth

Files generated/changed by the “:auth” command

CREATE src/app/main/views/login/login-routing.module.ts (546 bytes)
CREATE src/app/main/views/login/login.module.ts (819 bytes)
CREATE src/app/main/views/login/components/logout-button/logout-button.component.ts (1158 bytes)
CREATE src/app/main/views/login/login-main/login-main.component.html (1074 bytes)
CREATE src/app/main/views/login/login-main/login-main.component.ts (1590 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.actions.ts (1148 bytes)
CREATE src/app/root-store/auth-store/auth-mock.service.ts (2021 bytes)
CREATE src/app/root-store/auth-store/auth-store.module.ts (1017 bytes)
CREATE src/app/root-store/auth-store/auth.guard.ts (1359 bytes)
CREATE src/app/root-store/auth-store/auth.service.ts (731 bytes)
CREATE src/app/root-store/auth-store/conf.ts (76 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.effects.ts (1503 bytes)
CREATE src/app/root-store/auth-store/index.d.ts (271 bytes)
CREATE src/app/root-store/auth-store/index.ts (271 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.names.ts (47 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.reducer.ts (731 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.selectors.ts (1525 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.state.ts (319 bytes)
CREATE src/app/main/models/vo/auth.ts (277 bytes)

UPDATE src/app/app-routing.module.ts (558 bytes)
UPDATE src/app/root-store/index.ts (309 bytes)
UPDATE src/app/root-store/index.d.ts (309 bytes)
UPDATE src/app/root-store/__clazz@dasherize__.state.ts (184 bytes)
UPDATE src/app/root-store/root-store.module.ts (1051 bytes)

auth0


Overview

Generates a boilerplate for authentication implementation containing an store section and components file.

Command

ng generate ngrx-entity-crud:auth0

Examples

ng generate ngrx-entity-crud:auth0

Files generated/changed by the “:auth0” command

CREATE src/app/root-store/auth-store/__clazz@dasherize__.actions.ts (776 bytes)
CREATE src/app/root-store/auth-store/auth-store.module.ts (1044 bytes)
CREATE src/app/root-store/auth-store/auth.guard.ts (1359 bytes)
CREATE src/app/root-store/auth-store/authentication.service.ts (675 bytes)
CREATE src/app/root-store/auth-store/conf.ts (75 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.effects.ts (1754 bytes)
CREATE src/app/root-store/auth-store/index.d.ts (271 bytes)
CREATE src/app/root-store/auth-store/index.ts (271 bytes)
CREATE src/app/root-store/auth-store/login.component.ts (2117 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.names.ts (47 bytes)
CREATE src/app/root-store/auth-store/profile.ts (224 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.reducer.ts (475 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.selectors.ts (699 bytes)
CREATE src/app/root-store/auth-store/__clazz@dasherize__.state.ts (192 bytes)

UPDATE src/app/root-store/index.ts (309 bytes)
UPDATE src/app/root-store/index.d.ts (309 bytes)
UPDATE src/app/root-store/__clazz@dasherize__.state.ts (184 bytes)
UPDATE src/app/root-store/root-store.module.ts (1051 bytes)

Running unit tests

Run ng test to execute the unit tests via Karma.

Help

If you need help, or want to help me: https://github.com/jucasoft/ngrx-entity-crud/issues

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

16.1.0

3 months ago

16.0.0

6 months ago

15.0.3

1 year ago

14.1.0

1 year ago

15.0.2

1 year ago

15.0.0-beta.9

1 year ago

15.0.1

1 year ago

15.0.0-beta.7

1 year ago

15.0.0-beta.8

1 year ago

15.0.0-beta.5

1 year ago

15.0.0-beta.6

1 year ago

12.10.1

2 years ago

12.11.0-beta.5

2 years ago

12.11.0-beta.4

2 years ago

12.11.0-beta.3

2 years ago

12.11.0-beta.2

2 years ago

12.11.0-beta.1

2 years ago

12.11.0-beta.0

2 years ago

13.0.0-beta.0

2 years ago

13.1.0

2 years ago

13.1.0-beta.3

2 years ago

13.1.0-beta.2

2 years ago

13.1.0-beta.0

2 years ago

13.1.0-beta.6

2 years ago

13.1.0-beta.5

2 years ago

13.1.0-beta.4

2 years ago

13.0.0

2 years ago

12.10.0

2 years ago

12.10.0-beta.0

2 years ago

12.10.0-beta.1

2 years ago

12.9.0-beta.1

2 years ago

12.9.0-beta.2

2 years ago

12.9.0-beta.0

2 years ago

12.9.0-beta.5

2 years ago

12.9.0-beta.6

2 years ago

12.9.0-beta.3

2 years ago

12.9.0-beta.4

2 years ago

12.9.0

2 years ago

12.1.3-beta.1

2 years ago

12.8.6

2 years ago

12.1.3

2 years ago

12.0.6-beta.3

3 years ago

12.0.6-beta.2

3 years ago

12.0.6-beta.6

3 years ago

12.0.6-beta.5

3 years ago

12.0.6-beta.4

3 years ago

12.0.6-beta.19

3 years ago

12.0.6-beta.16

3 years ago

12.0.6-beta.15

3 years ago

12.0.6-beta.18

3 years ago

12.0.6-beta.17

3 years ago

12.0.6-beta.23

3 years ago

12.0.6-beta.22

3 years ago

12.0.6-beta.25

3 years ago

12.0.6-beta.24

3 years ago

12.0.6-beta.21

3 years ago

12.0.6-beta.20

3 years ago

12.0.6-beta.12

3 years ago

12.0.6-beta.11

3 years ago

12.0.6-beta.14

3 years ago

12.0.6-beta.13

3 years ago

12.0.6-beta.10

3 years ago

12.1.2

3 years ago

12.1.0

3 years ago

12.1.1

3 years ago

12.1.0-beta.2

3 years ago

12.1.0-beta.1

3 years ago

12.0.6-beta.1

3 years ago

12.0.4

3 years ago

12.0.4-beta.5

3 years ago

12.0.4-beta.2

3 years ago

12.0.4-beta.3

3 years ago

12.0.4-beta.8

3 years ago

12.0.4-beta.9

3 years ago

12.0.4-beta.6

3 years ago

12.0.4-beta.7

3 years ago

12.0.4-ng-add.4

3 years ago

12.0.4-ng-add.3

3 years ago

12.0.4-ng-add.2

3 years ago

12.0.4-ng-add.1

3 years ago

12.0.4-ng-add.8

3 years ago

12.0.4-ng-add.7

3 years ago

12.0.4-ng-add.6

3 years ago

12.0.4-ng-add.5

3 years ago

12.0.5-beta.1

3 years ago

12.0.4-beta.11

3 years ago

12.0.4-beta.12

3 years ago

12.0.4-beta.10

3 years ago

12.0.4-beta.1

3 years ago

12.0.3

3 years ago

12.0.2

3 years ago

12.0.0

3 years ago

12.0.1

3 years ago

12.0.0-beta.2

3 years ago

12.0.0-beta.1

3 years ago

12.0.0-beta.0

3 years ago

11.8.5

3 years ago

11.8.4

3 years ago

11.8.2

3 years ago

11.8.3

3 years ago

11.8.0

3 years ago

11.8.0-beta.0

3 years ago

11.8.1

3 years ago

11.7.0

3 years ago

11.7.1

3 years ago

11.6.65

3 years ago

11.6.64

3 years ago

11.6.63

3 years ago

11.6.61

3 years ago

11.6.6

3 years ago

11.6.6-beta.1

3 years ago

11.6.6-beta.2

3 years ago

11.6.6-beta.3

3 years ago

11.6.6-beta.4

3 years ago

11.6.6-beta.5

3 years ago

11.6.5

3 years ago

11.6.3

3 years ago

11.6.2

3 years ago

11.6.1

3 years ago

11.6.0

3 years ago

11.6.0-beta.9

3 years ago

11.6.0-beta.8

3 years ago

11.6.0-beta.6

3 years ago

11.6.0-beta.5

3 years ago

11.6.0-beta.4

3 years ago

11.6.0-beta.3

3 years ago

11.6.0-beta.2

3 years ago

11.6.0-beta.1

3 years ago

11.6.0-beta.0

3 years ago

11.5.2

3 years ago

11.5.1

3 years ago

11.5.0

3 years ago

11.4.0-beta.1

3 years ago

11.4.0-beta.2

3 years ago

11.4.0-beta.0

3 years ago

11.4.0

3 years ago

11.4.1

3 years ago

11.3.21

3 years ago

11.3.2

3 years ago

11.3.1

3 years ago

11.3.0

3 years ago

11.3.0-beta.0

3 years ago

11.2.5

3 years ago

11.2.4

3 years ago

11.2.3

3 years ago

11.2.2

3 years ago

11.2.0

3 years ago

11.2.1

3 years ago

11.1.0-beta.3

3 years ago

11.1.0-beta.2

3 years ago

11.1.0

3 years ago

11.1.0-beta.1

3 years ago

11.0.1

3 years ago

11.0.0

3 years ago

11.0.0-beta.3

3 years ago

11.0.0-beta.2

3 years ago

11.0.0-beta.0

3 years ago

11.0.0-beta.1

3 years ago

10.1.11

3 years ago

10.1.12

3 years ago

10.1.10

3 years ago

10.1.0

4 years ago

10.0.2

4 years ago

10.0.1

4 years ago

10.0.0

4 years ago

9.0.9

4 years ago

9.0.8

4 years ago

9.0.7

4 years ago

9.0.1

4 years ago

9.0.0

4 years ago

0.6.82

4 years ago

0.6.80

4 years ago

0.6.72

4 years ago

0.6.71

4 years ago

0.6.74

4 years ago

0.6.73

4 years ago

0.6.70

4 years ago

0.6.60

4 years ago

0.6.53

4 years ago

0.6.52

4 years ago

0.6.51

4 years ago

0.6.41

4 years ago

0.6.40

4 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.61

4 years ago

0.5.62

4 years ago

0.5.60

4 years ago

0.5.58

5 years ago

0.5.57

5 years ago

0.0.0

5 years ago

0.5.56

5 years ago

0.5.55

5 years ago

0.5.54

5 years ago

0.4.54

5 years ago

0.4.53

5 years ago

0.4.52

5 years ago

0.4.51

5 years ago

0.4.50

5 years ago

0.4.48

5 years ago

0.4.47

5 years ago

0.4.46

5 years ago

0.4.45

5 years ago

0.4.44

5 years ago

0.4.43

5 years ago

0.4.42

5 years ago

0.4.41

5 years ago

0.4.40

5 years ago

0.4.39

5 years ago

0.4.38

5 years ago

0.4.37

5 years ago

0.4.36

5 years ago

0.4.3

5 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.31

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.1.32

5 years ago

0.1.31

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.1

5 years ago