htmv 0.0.60 → 0.0.63
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/dist/compiler/parser.js
CHANGED
|
@@ -89,7 +89,7 @@ export function parse(tokens) {
|
|
|
89
89
|
nodes.push({
|
|
90
90
|
type: "component",
|
|
91
91
|
path: token.tag,
|
|
92
|
-
props: rawArgsToProps(rawArgs),
|
|
92
|
+
props: rawArgsToProps(rawArgs.slice(0, -1)),
|
|
93
93
|
children: [],
|
|
94
94
|
});
|
|
95
95
|
continue;
|
|
@@ -97,7 +97,7 @@ export function parse(tokens) {
|
|
|
97
97
|
nodes.push({
|
|
98
98
|
type: "component",
|
|
99
99
|
path: token.tag,
|
|
100
|
-
props: rawArgsToProps(rawArgs
|
|
100
|
+
props: rawArgsToProps(rawArgs),
|
|
101
101
|
children: parseChildren(tag),
|
|
102
102
|
});
|
|
103
103
|
continue;
|
package/dist/views-registry.js
CHANGED
|
@@ -11,9 +11,10 @@ export async function registerViews() {
|
|
|
11
11
|
const files = await deepReadDir(viewsPath);
|
|
12
12
|
for (const file of files) {
|
|
13
13
|
if (file.endsWith(".html")) {
|
|
14
|
-
const
|
|
14
|
+
const relativePath = path.relative(viewsPath, file);
|
|
15
|
+
const name = relativePath.slice(0, -".html".length);
|
|
15
16
|
const code = await fs.readFile(file, "utf-8");
|
|
16
|
-
addToViewRegistry(
|
|
17
|
+
addToViewRegistry(name, code);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
}
|