A collection of Angular schematics to aid with Shipshape development.
(Only a component one at present)
- Make sure you have the Angular CLI installed:
npm install -g @angular/cli@13
- Install the package as a dev dependency if not already installed:
npm install shipshape-schematics --save-dev
- Create yourself a smart/dumb component:
ng generate shipshape-schematics:component --name MyNewThing- ...will create these files:
CREATE my-new-thing-smart.component.html (35 bytes)
CREATE my-new-thing-smart.component.ts (317 bytes)
CREATE my-new-thing.component.html (66 bytes)
CREATE my-new-thing.component.scss (46 bytes)
CREATE my-new-thing.component.spec.po.ts (304 bytes)
CREATE my-new-thing.component.spec.ts (1285 bytes)
CREATE my-new-thing.component.ts (292 bytes)
CREATE my-new-thing.module.ts (304 bytes)
CREATE my-new-thing.stories.ts (366 bytes)
npm install -g @angular/cli@13
npm i -g @angular-devkit/schematics-cli@13
- Make changes...
npm run buildschematics .:component --name MyNewThing --debug=false- Check the files created are correct
- Make changes...
- Remove
package-lock.json - Update version in
package.json npm install- Update
CHANGELOG.md npm run build- Publish a release in GitHub
npm publish(only owner can do this)