@primate/handlebars 0.5.0 → 0.7.0
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/lib/private/default.d.ts +7 -0
- package/lib/private/default.js +10 -0
- package/lib/private/init.d.ts +4 -0
- package/lib/private/init.js +12 -0
- package/lib/private/runtime.d.ts +7 -0
- package/lib/private/runtime.js +4 -0
- package/lib/public/default.d.ts +1 -3
- package/lib/public/default.js +1 -2
- package/lib/public/runtime.d.ts +1 -3
- package/lib/public/runtime.js +1 -2
- package/package.json +6 -5
- package/lib/private/Default.d.ts +0 -7
- package/lib/private/Default.js +0 -8
- package/lib/private/Runtime.d.ts +0 -10
- package/lib/private/Runtime.js +0 -10
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import init from "#init";
|
|
2
|
+
import frontend from "@primate/core/frontend";
|
|
3
|
+
import handlebars from "handlebars";
|
|
4
|
+
export default frontend({
|
|
5
|
+
...init,
|
|
6
|
+
compile: {
|
|
7
|
+
server: (text) => `export default ${handlebars.precompile(text)};`,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import runtime from "handlebars/runtime.js";
|
|
2
|
+
const module = {
|
|
3
|
+
name: "handlebars",
|
|
4
|
+
extensions: [".hbs"],
|
|
5
|
+
layouts: false,
|
|
6
|
+
client: false,
|
|
7
|
+
render(component, props) {
|
|
8
|
+
return { body: runtime.template(component)(props) };
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default module;
|
|
12
|
+
//# sourceMappingURL=init.js.map
|
package/lib/public/default.d.ts
CHANGED
package/lib/public/default.js
CHANGED
package/lib/public/runtime.d.ts
CHANGED
package/lib/public/runtime.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primate/handlebars",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Handlebars for Primate",
|
|
5
5
|
"homepage": "https://primate.run/docs/frontend/handlebars",
|
|
6
6
|
"bugs": "https://github.com/primate-run/primate/issues",
|
|
@@ -17,20 +17,21 @@
|
|
|
17
17
|
"!/**/*.spec.*"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"handlebars": "^4.7.
|
|
21
|
-
"@primate/core": "^0.
|
|
20
|
+
"handlebars": "^4.7.9",
|
|
21
|
+
"@primate/core": "^0.7.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"primate": "^0.
|
|
24
|
+
"primate": "^0.38.0"
|
|
25
25
|
},
|
|
26
26
|
"imports": {
|
|
27
27
|
"#*": {
|
|
28
|
-
"
|
|
28
|
+
"@primate/source": "./src/private/*.ts",
|
|
29
29
|
"default": "./lib/private/*.js"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
34
|
+
"@primate/source": "./src/public/default.ts",
|
|
34
35
|
"browser": "./lib/public/browser.js",
|
|
35
36
|
"runtime": "./lib/public/runtime.js",
|
|
36
37
|
"default": "./lib/public/default.js"
|
package/lib/private/Default.d.ts
DELETED
package/lib/private/Default.js
DELETED
package/lib/private/Runtime.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import FrontendModule from "@primate/core/frontend/Module";
|
|
2
|
-
import type Render from "@primate/core/frontend/Render";
|
|
3
|
-
export default class Runtime extends FrontendModule {
|
|
4
|
-
name: string;
|
|
5
|
-
defaultExtensions: string[];
|
|
6
|
-
layouts: boolean;
|
|
7
|
-
client: boolean;
|
|
8
|
-
render: Render;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=Runtime.d.ts.map
|
package/lib/private/Runtime.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import FrontendModule from "@primate/core/frontend/Module";
|
|
2
|
-
import runtime from "handlebars/runtime.js";
|
|
3
|
-
export default class Runtime extends FrontendModule {
|
|
4
|
-
name = "handlebars";
|
|
5
|
-
defaultExtensions = [".hbs"];
|
|
6
|
-
layouts = false;
|
|
7
|
-
client = false;
|
|
8
|
-
render = (component, props) => ({ body: runtime.template(component)(props) });
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=Runtime.js.map
|