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.
@@ -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.slice(0, -1)),
100
+ props: rawArgsToProps(rawArgs),
101
101
  children: parseChildren(tag),
102
102
  });
103
103
  continue;
@@ -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 name = file.slice(0, -".html".length);
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(path.basename(name), code);
17
+ addToViewRegistry(name, code);
17
18
  }
18
19
  }
19
20
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "htmv",
3
3
  "main": "dist/index.js",
4
4
  "type": "module",
5
- "version": "0.0.60",
5
+ "version": "0.0.63",
6
6
  "exports": {
7
7
  ".": {
8
8
  "types": "./dist/index.d.ts",