pampy.js
pampy.js copied to clipboard
Distribute a browser-compatible version of pampy
People might want to use pampy directly in a browser, which means they need a version of pampy with a good cross-browser compatibility (support of old javascript versions).
I've added Lyo as a pre-publish task, so everytime you run npm publish
, a browser-compatible bundle of pampy will be created in a /dist
folder, and will be published to the npm registry.
You can test what it does by running npm run prepublishOnly
.
I've added the dist folder to your .gitignore
, but it's up to you to commit it if you want.
Here is a preview of the bundle, and here is a simple jsFiddle to prove that it works well.
I've also added some lines of documentation in your README
so people can use the CDN version of the bundle provided by jsDelivr.
Thank you, this is very much needed. I thought this used webpack, but it doesn't. So it's only for people that want to import it without setting up a webpack project?
Yep, that's it! Small projects, demos, or projects without a build step can use it right away.