https://github.com/mikeal/distjs
Distribute standalone WebComponents w/ npm.
https://github.com/mikeal/distjs
Last synced: 2 months ago
JSON representation
Distribute standalone WebComponents w/ npm.
- Host: GitHub
- URL: https://github.com/mikeal/distjs
- Owner: mikeal
- Created: 2017-10-01T19:38:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-21T00:39:49.000Z (over 7 years ago)
- Last Synced: 2024-05-01T22:14:17.553Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 41
- Watchers: 2
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```html
```