0.0.0 • Published 4 years ago

jab-react-schematics v0.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Getting Started With Schematics

This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.

Testing

To test locally, install @angular-devkit/schematics-cli globally and use the schematics command line tool. That tool acts the same as the generate command of the Angular CLI, but also has a debug mode.

Check the documentation with

schematics --help

Unit Testing

npm run test will run the unit tests, using Jasmine as a runner and test framework.

Publishing

To publish, simply do:

npm run build
npm publish

That's it!

Building npm install -g @angular-devkit/schematics-cli@latest

to use it run the global link command

npm link jab-react-schematics

Schematic Examples

Functional Components

schematics jab-react-schematics:functional-component --name=NAME --path=NAME --excludeStorybook=false

Repository Pattern File Generation

schematics jab-react-schematics:repository-pattern-files --dbContextName CRMDbContext --modelName WorkflowRule --contextSpecificFolder CRM

Initial action, saga, reducer creation with basic items

schematics jab-react-schematics:react-store-item --itemName=Workflow

Add action, saga, reducer to existing files

schematics jab-react-schematics:action-saga-reducer-trio --name removeContactVehicle --actionPrefix REMOVE_CONTACT_VEHICLE --actionPayload "contactId: string, vehicleId: string"

Create Card Component for model

schematics jab-react-schematics:react-material-card-from-json: --objectName adUser --jsonString '{\"adUserId\": \"\",\"clientId\": \"\",\"emailAddress\": \"\",\"firstName\": \"\",\"lastName\": \"\",\"mobilePhone\": \"\",\"workPhone\": \"\",\"isLicensedUser\": \"\",\"active\": \"\",\"flashReport\": \"\",\"canAccessAllReports\": \"\",\"isVerified\": \"\",\"hasAcceptedLegal\": \"\",\"isClientAdmin\": \"\",\"isSuperUser\": \"\"}'

npm link schematiclocation (e.g. c:\development\jab\trunk....)