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

Add bundling hints to the README? #104

Open
cube-dan opened this issue Feb 7, 2021 · 0 comments
Open

Add bundling hints to the README? #104

cube-dan opened this issue Feb 7, 2021 · 0 comments

Comments

@cube-dan
Copy link

cube-dan commented Feb 7, 2021

Greets team Ladda. It's mentioned in the README.md that it’s "recommended to use a bundler such as Rollup, Parcel, or Webpack to create a production-ready code bundle."

For someone that's:

  1. never used Rollup.js before, but found webpack to be painful
  2. really likes Ladda, but needs to use it on an oldschool LAMP site

... hitting a dead end like that stunk — just not as much as the thought of diving back down the webpack docs hole.

To help future Ladda users that find themselves in a similar situation — wanting to use the latest version instead of an outdated fork, and being stuck (for now) under an aging LAMP — I dropped in (thread jacked ... long story) a HOWTO over here.

The important bits are:

  1. Transpile Ladda:
rollup --name Ladda --globals spin.js:Spin --input ladda.js --format iife --file ladda.iife.js
  1. Transpile the Ladda dependency, Spin.js:
rollup --silent --name Spin --input spin.js --format umd --file spin.umd.js

... And you're done! The rest of the documented Ladda magic works great!


Would you guys be willing to drop a bundler example, like the two rollup cli lines above, into the README.md? ... Or would you accept a PR?

Look on the bright side, with any luck we won’t need bundlers soon!?

Thanks for considering this guys.

-Dan

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

No branches or pull requests

1 participant