@chollenbeck/ngx-schematics
v5.1.1
Published
Custom angular schematics for Angular 14 development.
Downloads
38
Maintainers
Readme
NGX Appworks Schematics
Summary
Angular schematics designed to work with a homebrewed Angular seed project. Most operations adhere to the standard /src/app directory flow, but some files such as services make use of shared resources not included in this package.
Schematics included for both RESTful API and Google's Firebase platform. Both schematics share the same interface schematic, but have seperate form, list, manage, and service configurations.
Issues
Please submit any and all issues/enhancements to Github. I monitor the repo multiple times a week and usually respond to requests within a few days.
Installation
This package is best used a dev dependency and can be installed via NPM with the following command:
npm install --save-dev @chollenbeck/ngx-appworks-schematics@latest
Recommended package.json scripts
The double hash on the end of the script allows arguments to apply to the ng g
action vs the npm run
action. Add/Remove functions and rename as needed.
"scripts": {
"ngc:c": "ng g @chollenbeck/ngc:component -- ",
"ngc:page": "ng g @chollenbeck/ngc:page -- ",
"ngc:i": "ng g @chollenbeck/ngc:interface --",
"ngc:service": "ng g @chollenbeck/ngc:service-firebase --
}
Versioning
This package uses symantic versioning and follows these guidelines:
- Major | Newly added schematic or removal of an existing schematic.
- Minor | Schematic functionality tweaks to templates or chained schematics. May include renaming of schematics which will BREAK previous versions.
- Patch | Bugfix or non functional enhancements such as comments or syntax fixes in templates.
Schematics List
Each schematic is run with space separated arguments and includes prompts for any missing arguments.
- Feature
- Model
- Component (Empty)
- Page (Empty)
- Firestore Service
Feature Folder
Generates a new folder within the features
folder with the designated name. Includes a standard feature module and routing module files.
Example: npm run ngc:feature-folder my-feature
Model
Generates a .ts file with the {interface-name}.model.ts
naming convention in a models
folder inside the designated feature folder.
Example: npm run ngc:model my-feature model-name
Component
An empty component with stubbed Import & Export properties.
Example: npm run ngc:component my-feature my-component
Page
An empty page.
Example: npm run ngc:component my-feature my-component
Firestore Service
An empty Firestore service which extends the default firestore base service. Includes a constructor with a stubbed converter object for Firestore integration.
Example: npm run ngc:service my-service