A component library for Workwell
npm install @workwell-global/component-libraryTo use the package locally we use yalc.
1. Install yalc globally npm i yalc -g
2. Publish the package npm run yalc:publish
3. Go to the repo you want to import the module to and run yalc add @workwell-global/component-library. This will add "@workwell-global/component-library": "file:.yalc/@workwell-global/component-library", to your package.json
4. For first install of the package in external repo, run npm i
5. After making changes in the library, use npm run yalc:push to build the library and update the version in the store
6. When you are done with development and want to return your package.json to its previous setting, run yalc remove @workwell-global/component-library from the external repo
To import a component into the host repo you can use:
``bash`
import { WLButton } from '@workwell-global/component-library'
or for multiple components:
`bash``
import { WLButton, WLCard } from '@workwell-global/component-library'
The package is published to and installed from the NPM package repository and can be installed like any other NPM package.
Important: The version number must be updated for publishing to work.