hono-router
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -73,7 +73,5 @@ #!/usr/bin/env node | ||
const entryPath = path.join(currentPath, entry.name); | ||
let importPath = path | ||
const importPath = path | ||
.join(basePath, entry.name) | ||
if (!isDeno){ | ||
importPath = importPath.replace(/\.(ts|tsx)$/, ''); | ||
} | ||
.replace(/\.(ts|tsx)$/, ''); | ||
if (entry.isDirectory()) { | ||
@@ -93,3 +91,3 @@ traverseDirectories(entryPath, importPath); | ||
.replace(/\[(.+?)\]/g, '$1'); // Ensure valid variable names | ||
const importPathString = isDeno ? importPath : importPath.replace(/index$/, ''); | ||
const importPathString = isDeno ? path.join(basePath, entry.name) : importPath.replace(/index$/, ''); | ||
const relativePath = path | ||
@@ -96,0 +94,0 @@ .relative(path.dirname(out), path.join(dir, importPathString)) |
{ | ||
"name": "hono-router", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "hotloading script to generate file-based routing config for Hono", | ||
@@ -5,0 +5,0 @@ "author": "Stu Kennedy", |
9794
218