baseui-wc-utils
v0.1.1
Published
Web component utilities to reuse common code
Downloads
3
Readme
Base UI: Web component utilities
Dependencies
- Node v6+
- Yarn (optional, only if you want to reduce packages install time)
To run local dev server (http://localhost:1818/)
npm start
- Install dependencies
- Clean build folder
- lint JS files
- starts webpack dev server
- auto update browser window/tab using Hot Module Replacement (HMR)
To just generate docs for JS
npm run docs
To bundle for production
npm run release
- This will perform first 3 steps from above and tree shake and minify for production
- Also creates documentation for JS files using jsdoc blocker comments
Usage guide (to be updated)
Import only needed helpers to utilize tree shaking
import { dom, BaseClass } from 'baseui-wc-utils';
Or
import baseuiWcUtils from 'baseui-wc-utils';
in browser script tag
const { dom } = window.baseuiWcUtils or var dom = window.baseuiWcUtils.dom;