@primate/htmx 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/package.json +4 -1
- package/src/module.js +13 -15
package/README.md
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primate/htmx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Primate HTMX module",
|
|
5
5
|
"homepage": "https://primatejs.com/modules/htmx",
|
|
6
6
|
"bugs": "https://github.com/primatejs/htmx/issues",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"maximin": "^0.1.2"
|
|
15
15
|
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"primate": "0.14.0"
|
|
18
|
+
},
|
|
16
19
|
"type": "module",
|
|
17
20
|
"exports": "./exports.js",
|
|
18
21
|
"engines": {
|
package/src/module.js
CHANGED
|
@@ -33,18 +33,16 @@ const htmx = (content, {status = 200, partial = false, adhoc = false} = {}) =>
|
|
|
33
33
|
return [await getBody(env, {adhoc, partial, content}), options];
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
export default () => (
|
|
37
|
-
|
|
38
|
-
register
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
};
|
|
36
|
+
export default () => ({
|
|
37
|
+
register(env, next) {
|
|
38
|
+
env.register("htmx", htmx);
|
|
39
|
+
return next(env);
|
|
40
|
+
},
|
|
41
|
+
async publish(env, next) {
|
|
42
|
+
const src = "htmx.min.js";
|
|
43
|
+
const path = ["node_modules", "htmx.org", "dist", src];
|
|
44
|
+
const code = await Path.resolve().join(...path).file.read();
|
|
45
|
+
await env.publish({src, code});
|
|
46
|
+
return next(env);
|
|
47
|
+
},
|
|
48
|
+
});
|