fix
This commit is contained in:
parent
bed627ad82
commit
eabb5705bd
6
index.js
6
index.js
@ -27,8 +27,12 @@ module.exports = function main (
|
|||||||
for (const f of fs.readdirSync (modulefolder)) {
|
for (const f of fs.readdirSync (modulefolder)) {
|
||||||
const regex = /(?<method>.*?)-(?<url>.*?)\.js/u;
|
const regex = /(?<method>.*?)-(?<url>.*?)\.js/u;
|
||||||
const { groups } = regex.exec (f);
|
const { groups } = regex.exec (f);
|
||||||
if ('undefined' !== typeof subdir)
|
|
||||||
|
if ('undefined' === typeof subdir)
|
||||||
|
groups.url = `/${groups.url}/`;
|
||||||
|
else
|
||||||
groups.url = `/${subdir}/${groups.url}/`;
|
groups.url = `/${subdir}/${groups.url}/`;
|
||||||
|
|
||||||
groups.url = groups.url
|
groups.url = groups.url
|
||||||
.replace (/^\/[^/]*\/root/iu, '/')
|
.replace (/^\/[^/]*\/root/iu, '/')
|
||||||
.replace (/\./gu, '/')
|
.replace (/\./gu, '/')
|
||||||
|
Reference in New Issue
Block a user