Skip to content

Debug and Publish library to NPM

AAMarcosHannecke edited this page Nov 19, 2018 · 20 revisions

Local setup

IMPORTANT: It's required to have Alytic and Serfalytic dev environments running

  • git clone https://github.com/AAMarcosHannecke/aafilter.git
  • Install dependencies npm install
  • Pass the required directive properties in src/app/app.component.html.
<aa-filter
  endpoint="http://localhost:9000/api/v2/sources/2"
  cardEndpoint="http://localhost:9000/api/v2/decks/1/cards/1">
</aa-filter>

Modify Library files

The library files are located in /projects/aafilter

  • /projects/aafilter/src/lib/aafilter.component.html
  • /projects/aafilter/src/lib/aafilter.component.scss
  • /projects/aafilter/src/lib/aafilter.component.ts
  • /projects/aafilter/src/lib/aafilter.module.ts

Publish library on NPM

  1. npm version patch - Update version number
  2. ng build aafilter - Build library for production
  3. cd /dist/aafilter - Change directory
  4. npm login - Login into NPM account
  5. npm publish - Publish library

Create custom sidebar

Clone this wiki locally