prev-cli 0.22.2 → 0.22.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +2 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -128,7 +128,8 @@ function isIndexFile(basename) {
128
128
  return lower === "index" || lower === "readme";
129
129
  }
130
130
  function fileToRoute(file) {
131
- const withoutExt = file.replace(/\.mdx?$/, "");
131
+ const normalizedFile = file.replace(/^\./, "").replace(/\/\./g, "/");
132
+ const withoutExt = normalizedFile.replace(/\.mdx?$/, "");
132
133
  const basename = path2.basename(withoutExt).toLowerCase();
133
134
  if (basename === "index" || basename === "readme") {
134
135
  const dir = path2.dirname(withoutExt);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prev-cli",
3
- "version": "0.22.2",
3
+ "version": "0.22.3",
4
4
  "description": "Transform MDX directories into beautiful documentation websites",
5
5
  "type": "module",
6
6
  "license": "MIT",