distjs

1.1.0 • Public • Published

distjs - Distribute standalone WebComponents w/ npm

Usage:

> npm install distjs
> distjs install

Or, you can manually enable in your package.json.

{
  ...
  "scripts": {
    "prepublishOnly": "distjs",
    ...
  }
}

Before each npm publish distjs will build standealone scripts in a dist/ directory. These scripts dynamically load a WebComponents polyfill before requiring your package.

The dist files will be named ${pkgname}.js and ${pkgname}.min.js.

This means that people can use your new elements with a simple script include from one of the many npm content CDN's.

Example:

<script src="https://cdn.jsdelivr.net/npm/pkgname@latest/dist/pkgname.min.js"></script>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    34
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    34
  • 1.0.0
    1

Package Sidebar

Install

npm i distjs

Weekly Downloads

13

Version

1.1.0

License

Apache-2.0

Last publish

Collaborators

  • mikeal