Skip to content

Commit

Permalink
chore(rollup config): update markdown parser plugin to create build d…
Browse files Browse the repository at this point in the history
…ir if it does not exist (#123)

- Fix build on Windows
  • Loading branch information
NeilSorensen authored Oct 29, 2024
1 parent e806a34 commit 16801c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ function markdownParser(config) {

// Construct the destination path
const dest = path.join(srcPath, config.targets[index].dest, `${fileName}.html`);
const destDir = path.join(srcPath, config.targets[index].dest);
if(!fs.existsSync(destDir)){
fs.mkdirSync(destDir);
}

// Write the parsed markdown to the destination path
fs.writeFileSync(dest, `<div>${markdown}</div>`);
Expand Down

0 comments on commit 16801c7

Please sign in to comment.