htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Extension docs: npm, bundler, min/unmin and SRI hash instructions

Open marisst opened this issue 1 year ago • 3 comments

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-ext clearer #2475

marisst avatar Dec 14 '24 20:12 marisst

@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.

marisst avatar Dec 15 '24 08:12 marisst

Don't worry @marisst , I'm terribly ignorant about this topic anyway so I will likely not be the one to review this 😆

Telroshan avatar Dec 16 '24 08:12 Telroshan

@Telroshan Okay. It's all ready for review now. Do you know who are the most relevant reviewers for this type of change?

marisst avatar Dec 20 '24 23:12 marisst

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!

Telroshan avatar Jan 09 '25 08:01 Telroshan

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.

marisst avatar Jan 12 '25 21:01 marisst