Socket
Book a DemoInstallSign in
Socket

distjs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

distjs

Usage:

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

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>

FAQs

Package last updated on 15 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts