@workwell-global/component-library
v1.1.14
Published
A component library for Workwell
Downloads
1,948
Readme
Workwell Component Library
Testing locally
To use the package locally we use yalc.
- Install yalc globally
npm i yalc -g - Publish the package
npm run yalc:publish - 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 yourpackage.json - For first install of the package in external repo, run
npm i - After making changes in the library, use
npm run yalc:pushto build the library and update the version in the store - When you are done with development and want to return your package.json to its previous setting, run
yalc remove @workwell-global/component-libraryfrom the external repo
Using the package
To import a component into the host repo you can use:
import { WLButton } from '@workwell-global/component-library'or for multiple components:
import { WLButton, WLCard } from '@workwell-global/component-library'Publishing / downloading the package
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.
