Fix create folder logic in cli.js
The paths changed in d003ea01
to start with a forward slash, this broke
the create folder detection logic as now it matched the first slash of
the path instead of sub-folder in the path. Fix by ignoring the first
character in the path.
This commit is contained in:
parent
ac1b1f13f4
commit
cf3229423b
1 changed files with 1 additions and 1 deletions
2
cli.ts
2
cli.ts
|
@ -25,7 +25,7 @@ if (!fs.existsSync(outDir)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const page of pages) {
|
for (const page of pages) {
|
||||||
const dirSep = page.ref.indexOf("/");
|
const dirSep = page.ref.indexOf("/", 1);
|
||||||
if (dirSep !== -1) {
|
if (dirSep !== -1) {
|
||||||
const dir = `${outDir}/${page.ref.slice(0, dirSep)}`;
|
const dir = `${outDir}/${page.ref.slice(0, dirSep)}`;
|
||||||
if (!fs.existsSync(dir)) {
|
if (!fs.existsSync(dir)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue