filesystem-routing 0.3.0 → 0.3.1
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/convention.js +2 -1
- package/package.json +1 -1
package/dist/convention.js
CHANGED
|
@@ -12,7 +12,8 @@ export function routePathFromFile(routeFile) {
|
|
|
12
12
|
const routePath = routeFile
|
|
13
13
|
// remove the initial slash
|
|
14
14
|
.slice(1)
|
|
15
|
-
|
|
15
|
+
// only strip a whole `index` segment, not a name that merely ends in "index" (e.g. `reindex`)
|
|
16
|
+
.replace(/(^|\/)index$/, "$1")
|
|
16
17
|
.replace(/\[([^/]+)\]/g, (_, m) => {
|
|
17
18
|
if (m.length > 3 && m.startsWith("...")) {
|
|
18
19
|
return `*${m.slice(3)}`;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "filesystem-routing",
|
|
3
3
|
"description": "Router-neutral file-system routing: scans a route directory into a neutral route manifest with pluggable conventions and delivery adapters",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.3.
|
|
5
|
+
"version": "0.3.1",
|
|
6
6
|
"author": "Ryan Carniato",
|
|
7
7
|
"homepage": "https://github.com/solidjs/filesystem-routing#readme",
|
|
8
8
|
"repository": {
|