<package description goes here>
Installation instructions
npm i -S {{package-name}}This exposes ESM and common JS via
package.json exports field.
import '{{package-name}}'require('{{package-name}}')<all attributes here>
<all events here>
import '{{package-name}}/css'Or minified:
import '{{package-name}}/min/css'{{component-name}} {
--example: pink;
}This calls the global function customElements.define. Just import, then use
the tag in your HTML.
import '{{package-name}}'<div>
<{{component-name}}></{{component-name}}>
</div>This package exposes minified JS and CSS files too. Copy them to a location that is accessible to your web server, then link to them in HTML.
cp ./node_modules/{{package-name}}/dist/index.min.js ./public/{{component-name}}.min.js
cp ./node_modules/{{package-name}}/dist/style.min.css ./public/{{component-name}}.css<head>
<link rel="stylesheet" href="./{{component-name}}.css">
</head>
<body>
<!-- ... -->
<script type="module" src="./{{component-name}}.min.js"></script>
</body>