Skip to content

Commit

Permalink
Fix Makefile.js gensite
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Apr 16, 2022
1 parent 4426c5b commit 822dc55
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile.js
Expand Up @@ -172,6 +172,12 @@ function generateFormatterExamples(formatterInfo, prereleaseVersion) {
}
}

const formattersDir = path.dirname(filename);

if (!test("-d", formattersDir)) {
mkdir(formattersDir);
}

output.to(filename);
formatterInfo.formatterResults.html.result.to(htmlFilename);
}
Expand Down Expand Up @@ -611,7 +617,7 @@ target.gensite = function(prereleaseVersion) {
const fullPath = path.join(DOCS_DIR, filePath),
htmlFullPath = fullPath.replace(".md", ".html");

if (test("-f", fullPath)) {
if (test("-d", fullPath)) {
rm("-rf", fullPath);

if (filePath.indexOf(".md") >= 0 && test("-f", htmlFullPath)) {
Expand Down

0 comments on commit 822dc55

Please sign in to comment.