Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribute a browser-compatible version of pampy #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Distribute a browser-compatible version of pampy #9

wants to merge 1 commit into from

Conversation

bokub
Copy link

@bokub bokub commented Dec 19, 2018

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.

@santinic
Copy link
Owner

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?

@bokub
Copy link
Author

bokub commented Dec 19, 2018

Yep, that's it!
Small projects, demos, or projects without a build step can use it right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants