0.0.15 • Published 4 years ago
@motorcitysystems/core v0.0.15
@motorcitysystems/core
This library was generated with Angular CLI version 11.2.14.
Installation
- Open the
.npmrcfile located in your User directory - Add the following to the
.npmrcfile and save:@motorcitysystems:registry=https://pkgs.dev.azure.com/motorcitysystems/_packaging/MCS.UI/npm/registry/ - Install with
npm install @motorcitysystems/core
Code scaffolding
Run ng generate component component-name --project core to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project core.
Note: Don't forget to add
--project coreor else it will be added to the default project in yourangular.jsonfile.
Editing
When creating new modules/components for the shared library, please use the Angular CLI for generating code scaffolding.
- Navigate to the
liblevel of the library directory (projects/core/src/lib) - Run
ng g module module-name, replacingmodule-namewith the name of your module - Navigate inside the newly created module directory
- Run
ng g component component-name --export --flat --style=scss, replacingcomponent-namewith the name of your component - Create an
index.tsfile inside of your new module directory - In the newly-created index file,
export * fromyour.moduleand.componentfiles (export * from './module-name.module';) - Update
public-api.tswith the exports from your new directory: (export * from './lib/module-name';) - Save all work -> version bump -> commit -> build -> publish
Build
Run ng build core --prod to build the project. The build artifacts will be stored in the dist/ directory.
Publishing
After building your library with ng build core --prod, go to the dist folder cd dist/core and run npm publish.
Package Publish Checklist
- Save changes
- Bump package version with
npm version patch(or potentiallymajor|minorinstead ofpatch) - Commit the version bump
- Run
ng build core --prod - Navigate to
dist/core - Run
npm publish
Running unit tests
Run ng test core to execute the unit tests via Karma.