Add htmx extensions to npm to allow installing via package manager
I could not find a way to install the htmx-extensions from npm. Ideally we would have one package per extension and be able to install and version them.
Doesn't npm i htmx-ext-sse for ex (see each extension's name in their package.json) work for you?
@Telroshan Oh, thank you. Maybe this could be documented in the install section of the extensions as well. Did not find any info on this.
You're right, we have a npm section on the lib's doc but the extensions don't have any.
We should likely add a mention & npm i command example, in each extension's README in their Install section?
A documentation PR would be welcome btw, if you feel like submitting one!
Will try to do this!
@Telroshan I was thinking of taking this up, Would I need to add npm i for core extensions or all?
Don't know if @tomdtp is still interested in this PR, but if not, sure feel free to do so @sameer-dudeja ! You could only do it for extensions in this repo anyway as community extensions are published on their own by htmx users, and their respective documentation lies on their own repo, so we don't manage those. So yeah, if you feel like it, the idea would be to add a npm installation mention to all extensions in this repo!
@tomdtp, @Telroshan, @sameer-dudeja I have created a PR updating the documentation of extensions and including guidelines for npm/bundler installation. This should solve the issue. https://github.com/bigskysoftware/htmx/pull/3078