Skip to content
/ distjs Public
forked from mikeal/distjs

Distribute standalone WebComponents w/ npm.

Notifications You must be signed in to change notification settings

rjewson/distjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

Distribute standalone WebComponents w/ npm.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%