Extension docs: npm, bundler, min/unmin and SRI hash instructions
Pull request should be viewed together with the corresponding PR in htmx-extensions repository https://github.com/bigskysoftware/htmx-extensions/pull/123.
Documentation is updated to elaborate on extension installation and integration. Until now, extension installation instructions were limited to a CDN script tag. This change adds:
- guidance on installation with npm
- guidance on integration with bundlers
- instructions to access minified and unminified extension versions
- SRI hash in CDN script tag installation example
- links to newest extension versions which were released with the
[email protected]release - makes the need of
hx-extclearer #2475
@Telroshan please don't review it yet. I converted to draft. Unfortunately I realised it won't be as easy as this. When integrating an extension with import statement, we need to figure out how to inject htmx in the scope of the extension. I think we also need to update all extension package definitions to make htmx.org a required dependency. I will need to investigate how this is done in other JS libraries. If you have good examples let me know.
Don't worry @marisst , I'm terribly ignorant about this topic anyway so I will likely not be the one to review this 😆
@Telroshan Okay. It's all ready for review now. Do you know who are the most relevant reviewers for this type of change?
Finally caught up with issues & PRs I had missed during holidays, I'll be reviewing these PRs (this one, the other in the extensions repo as well as the other webpack/Vite PR open on this repo) over the next couple days @marisst , as there is no esm expert available among us unfortunately (I'll take some time to dive into this whole topic first 😄 ) I'll keep you informed!
Apologies, I did something wrong in Git and messed up the PR. I opened a new PR for this. https://github.com/bigskysoftware/htmx/pull/3127
@Telroshan Thank you for the comments. I fixed them in the new PR, in this commit.