2.2.7 • Published 7 years ago

@practicalwebdev/schematics v2.2.7

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

Install

npm i @practicalwebdev/schematics

Schematics

component

ng generate @practicalwebdev/schematics:component -n <component-name> -p <html-prefix>

Parameters

--name, -nstringREQUIREDThe name of the component.
--prefix, -pstringREQUIREDThe html element prefix for your component.
--module, -mbooleandefault: trueCreate a module for the component.
--route, -rbooleandefault: falseCreate a routable module for the component.

Description

Generate an Angular component. Places files in src/app/components.

Generates the following files

  • src/app/components/<component-name>
    • index.ts
    • <component-name>.component.html
    • <component-name>.component.scss
    • <component-name>.component.spec.ts
    • <component-name>.component.ts

If module or route are set, it also generates a module file at:

src/app/components/<component-name>/<component-name>.module.ts

dialog

ng generate @practicalwebdev/schematics:dialog  -n <dialog-name> -p <html-prefix>

Parameters

--name, -nstringREQUIREDThe name of the dialog.
--prefix, -pstringREQUIREDThe html element prefix for your dialog.

Description

Generate an Angular Material dialog component. Places files in src/app/components.

Generates the following files

  • src/app/components/<dialog-name>-dialog
    • index.ts
    • <dialog-name>-dialog-body.component.html
    • <dialog-name>-dialog-body.component.scss
    • <dialog-name>-dialog-body.component.spec.ts
    • <dialog-name>-dialog-body.component.ts
    • <dialog-name>-dialog.component.html
    • <dialog-name>-dialog.component.scss
    • <dialog-name>-dialog.component.spec.ts
    • <dialog-name>-dialog.component.ts
    • <dialog-name>-dialog.module.ts

model

ng generate @practicalwebdev/schematics:model -n <model-name>

Parameters

--name, -nstringREQUIREDThe name of the dialog.

Description

Generate a model, with unit tests, and automatically add it to the exports from src/app/models/index.ts

Creates src/app/models/index.ts if it does not already exist.

Places files in src/app/models.

Generates the following files

  • src/app/models/<model-name>
    • index.ts
    • <model-name>.model.spec.ts
    • <model-name>.model.ts

service

ng generate @practicalwebdev/schematics:service -n <service-name>

Parameters

--name, -nstringREQUIREDThe name of the dialog.

Description

Generate an Angular service, with unit tests, and automatically add it to the exports from src/app/services/index.ts

Creates src/app/services/index.ts if it does not already exist.

Places files in src/app/services.

Generates the following files

  • src/app/services/<service-name>
    • index.ts
    • <service-name>.service.spec.ts
    • <service-name>.service.ts

store

ng generate @practicalwebdev/schematics:store -n <store-name>

Parameters

--name, -nstringREQUIREDThe name of the dialog.

Description

Generate an ngrx store, with unit tests, and automatically add it to the exports from src/app/store/index.ts

Creates src/app/store/index.ts if it does not already exist.

Places files in src/app/store.

Generates the following files

  • src/app/store/<store-name>
    • index.ts
    • <store-name>.store.spec.ts
    • <store-name>.store.ts
2.2.7

7 years ago

2.2.6

7 years ago

2.2.5

7 years ago

2.2.4

7 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago