This is a wip starter kit to provide a way to build lightweight Web Components using the Clarity Design System.
To run the project first install the dependencies by running npm install
.
Once installed start the local project by running npm run start
.
start
: runs local dev build and server in watch mode.clean
: cleans any prior build artifacts.build
: builds library into dist directory for publication.test
: runs unit teststest:watch
: runs unit tests in a watch modelint
: runs code lintingformat
: runs code formatting (prettier)
When ready to publish a new version of your library follow these steps:
- Update the version in the
./src/package.json
file. - Run command
npm run build
. - Publish the output contents of
./dist/lib
to your package registry of choice.
-
The
src/package.json
is the package file that will be published while the rootpackage.json
is for local dev build tools and dependencies. -
When adding a new component be sure to add the
register.js
to thesideEffects
entry in the./src/package.json
file. This ensure proper tree shaking of the Web Components.