Skip to content

Commit 27d284f

Browse files
committed
Create missing module directories when synchronizing doc README.md files
1 parent 6e4b7f3 commit 27d284f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ dist/
33
# generated types
44
.astro/
55

6+
# derived content on startup
7+
src/content/docs/docs/modules
8+
69
# dependencies
710
node_modules/
811

scripts/sync-modules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ This ${modType} is available at [github.com/${owner}/${mod.repo}](https://github
9191

9292
// Save file
9393
const folderPath = path.join(outputDir, mod.repo);
94-
if (!fs.existsSync(folderPath)) fs.mkdirSync(folderPath);
94+
if (!fs.existsSync(folderPath)) fs.mkdirSync(folderPath, { recursive: true });
9595

9696
const filePath = path.join(folderPath, 'index.md');
9797
// If file exists, make it writable so we can overwrite it

0 commit comments

Comments
 (0)