htmv 0.0.62 → 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.
@@ -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.62",
5
+ "version": "0.0.63",
6
6
  "exports": {
7
7
  ".": {
8
8
  "types": "./dist/index.d.ts",