-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Extension docs: npm, bundler, min/unmin and SRI hash instructions #3078
Conversation
@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 |
Don't worry @marisst , I'm terribly ignorant about this topic anyway so I will likely not be the one to review this 😆 |
…are#2939) * Update hx-headers.md Add an example of evaluated values passed to hx-headers. * Follow the example in hx-vals.
Update docs.md dead link
* Render toast as aria-live region on page load This tells the screen reader to announce updates that happen inside the `span#toast` element. * Update code sample in example text * Use <output> element to announce form action
Co-authored-by: scrhartley <[email protected]>
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 😄 ) |
After installing, you'll need to use appropriate tooling to bundle `node_modules/htmx-ext-extension-name/dist/extension-name.js` (or `.min.js`). For example, you might bundle the extension with htmx core from `node_modules/htmx.org/dist/htmx.js` and project-specific code. | ||
|
||
If you are using a bundler to manage your javascript (e.g. Webpack, Rollup): | ||
- Install `htmx.org` and `htx-ext-extension-name` via npm (replace `extension-name` with the name of the extension) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely a typo
- Install `htmx.org` and `htx-ext-extension-name` via npm (replace `extension-name` with the name of the extension) | |
- Install `htmx.org` and `htmx-ext-extension-name` via npm (replace `extension-name` with the name of the extension) |
import `htmx-ext-extension-name`; // replace `extension-name` with the name of the extension | ||
``` | ||
|
||
Note: [Idiomorph](/extensions/idiomorph) does not follow the naming convention of htmx extensions. Use `idiomorph` instead of `htmx-ext-idiomorph`. For example, `https://unpkg.com/idiomorph` or `npm install idiomorph`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth it to add another note here, to explain that community extensions might have different installation instructions (for the ones that aren't hosted on our extensions repo)?
And that the reader should check the extension's repo where the owner would have added documentation as to how to set it up, which may differ from ours
After installing, you'll need to use appropriate tooling to bundle `node_modules/htmx-ext-head-support/dist/head-support.js` (or `.min.js`). For example, you might bundle the extension with htmx core from `node_modules/htmx.org/dist/htmx.js` and project-specific code. | ||
|
||
If you are using a bundler to manage your javascript (e.g. Webpack, Rollup): | ||
- Install `htmx.org` and `htx-ext-head-support` via npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely a typo
- Install `htmx.org` and `htx-ext-head-support` via npm | |
- Install `htmx.org` and `htmx-ext-head-support` via npm |
After installing, you'll need to use appropriate tooling to bundle `node_modules/htmx-ext-htmx-1-compat/dist/htmx-1-compat.js` (or `.min.js`). For example, you might bundle the extension with htmx core from `node_modules/htmx.org/dist/htmx.js` and project-specific code. | ||
|
||
If you are using a bundler to manage your javascript (e.g. Webpack, Rollup): | ||
- Install `htmx.org` and `htx-ext-htmx-1-compat` via npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely a typo
- Install `htmx.org` and `htx-ext-htmx-1-compat` via npm | |
- Install `htmx.org` and `htmx-ext-htmx-1-compat` via npm |
After installing, you'll need to use appropriate tooling to bundle `node_modules/htmx-ext-preload/dist/preload.js` (or `.min.js`). For example, you might bundle the extension with htmx core from `node_modules/htmx.org/dist/htmx.js` and project-specific code. | ||
|
||
If you are using a bundler to manage your javascript (e.g. Webpack, Rollup): | ||
- Install `htmx.org` and `htx-ext-preload` via npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely a typo
- Install `htmx.org` and `htx-ext-preload` via npm | |
- Install `htmx.org` and `htmx-ext-preload` via npm |
After installing, you'll need to use appropriate tooling to bundle `node_modules/htmx-ext-response-targets/dist/response-targets.js` (or `.min.js`). For example, you might bundle the extension with htmx core from `node_modules/htmx.org/dist/htmx.js` and project-specific code. | ||
|
||
If you are using a bundler to manage your javascript (e.g. Webpack, Rollup): | ||
- Install `htmx.org` and `htx-ext-response-targets` via npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely a typo
- Install `htmx.org` and `htx-ext-response-targets` via npm | |
- Install `htmx.org` and `htmx-ext-response-targets` via npm |
After installing, you'll need to use appropriate tooling to bundle `node_modules/htmx-ext-sse/dist/sse.js` (or `.min.js`). For example, you might bundle the extension with htmx core from `node_modules/htmx.org/dist/htmx.js` and project-specific code. | ||
|
||
If you are using a bundler to manage your javascript (e.g. Webpack, Rollup): | ||
- Install `htmx.org` and `htx-ext-sse` via npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely a typo
- Install `htmx.org` and `htx-ext-sse` via npm | |
- Install `htmx.org` and `htmx-ext-sse` via npm |
After installing, you'll need to use appropriate tooling to bundle `node_modules/htmx-ext-ws/dist/ws.js` (or `.min.js`). For example, you might bundle the extension with htmx core from `node_modules/htmx.org/dist/htmx.js` and project-specific code. | ||
|
||
If you are using a bundler to manage your javascript (e.g. Webpack, Rollup): | ||
- Install `htmx.org` and `htx-ext-ws` via npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely a typo
- Install `htmx.org` and `htx-ext-ws` via npm | |
- Install `htmx.org` and `htmx-ext-ws` via npm |
* added wasm to htmx port essay * changed wasm-to-htmx essay * added image and changed author
Apologies, I did something wrong in Git and messed up the PR. I opened a new PR for this. #3127 @Telroshan Thank you for the comments. I fixed them in the new PR, in this commit. |
Pull request should be viewed together with the corresponding PR in htmx-extensions repository bigskysoftware/htmx-extensions#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:
[email protected]
releasehx-ext
clearer Extensions documentation could make need for hx-ext clearer #2475