htmx-extensions icon indicating copy to clipboard operation
htmx-extensions copied to clipboard

Add htmx extensions to npm to allow installing via package manager

Open tomdtp opened this issue 1 year ago • 4 comments

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.

tomdtp avatar Aug 20 '24 07:08 tomdtp

Doesn't npm i htmx-ext-sse for ex (see each extension's name in their package.json) work for you?

Telroshan avatar Aug 20 '24 18:08 Telroshan

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

tomdtp avatar Aug 21 '24 07:08 tomdtp

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!

Telroshan avatar Aug 21 '24 07:08 Telroshan

Will try to do this!

tomdtp avatar Aug 21 '24 07:08 tomdtp

@Telroshan I was thinking of taking this up, Would I need to add npm i for core extensions or all?

sameer-dudeja avatar Nov 27 '24 06:11 sameer-dudeja

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!

Telroshan avatar Nov 27 '24 08:11 Telroshan

@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

marisst avatar Dec 14 '24 20:12 marisst