@tech4good/angular-schematics

18.0.4 • Public • Published

Angular Schematics

This repository is used to generate modules, containers, components, and entities for Angular projects.

Usage

  1. Run npm install @tech4good/angular-schematics.
  2. Set the schematics to be the default using: ng config cli.defaultCollection @tech4good/angular-schematics
  3. Change directories to the directory you want to generate the files and run ng generate <schematic> <name>, where schematic = module, container, component, or entity (or if you did not make it the default, use ng generate @tech4good/angular-schematics:<schematic> <name>)

Setting up a new repository

  1. Create a new Angular repo using the CLI,
  2. Use ng generate init to add our base files to the new repo,
  3. Then add database configuration parameters:
  • Update the environments files with your firebase configs
  • Update .firebaserc with the firebase projects you're deploying to

Developing

  1. Clone this repository.
  2. Run npm install -g @angular-devkit/schematics-cli to install globally
  3. Run npm install, npm run build & npm link
  4. Run npm link @tech4good/angular-schematics in the Angular project directory
  5. Run ng generate @tech4good/angular-schematics:<schematic> to generate files (schematic = module, container, component, or entity)
  6. To test/debug new changes, run npm run build again before ng generate ...

Testing

To test, install the repo directly from github into another local repo to test your schematic.

npm install  https://github.com/tech4good-lab/angular-schematics.git#your-branch-name
npm link @tech4good/angular-schematics
ng generate @tech4good/angular-schematics:<schematic>

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 # will ask for a OTP (see Google Authenticator: npm)

That's it!

You can also use npm version <version> to update the version before publishing.

  • Don't forget to also update src/init/files/package.json.template so that the latest version of @tech4good/anguar-schematics is being used in the dependencies.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
18.0.473latest

Version History

VersionDownloads (Last 7 Days)Published
18.0.473
18.0.364
18.0.24
18.0.10
18.0.019
17.0.40
17.0.30
17.0.20
17.0.10
17.0.00
13.8.11
13.8.01
13.7.00
13.6.00
13.5.00
13.4.00
13.3.00
13.2.00
13.1.00
13.0.10
13.0.00
0.0.00
0.0.20

Package Sidebar

Install

npm i @tech4good/angular-schematics

Weekly Downloads

162

Version

18.0.4

License

MIT

Unpacked Size

276 kB

Total Files

132

Last publish

Collaborators

  • davidtlee
  • mwong775