Skip to content

Commit

Permalink
Fix buildDocs to create directory (palantir#2072)
Browse files Browse the repository at this point in the history
  • Loading branch information
nchen63 authored Jan 18, 2017
1 parent 3664812 commit d119274
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/buildDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ function buildSingleModuleDocumentation(documentation: IDocumentation, modulePat
// Ensure a directory exists and write the module's file.
const moduleName = (metadata as any)[documentation.nameMetadataKey];
const fileDirectory = path.join(documentation.subDirectory, moduleName);
if (!fs.existsSync(documentation.subDirectory)) {
fs.mkdirSync(documentation.subDirectory);
}
if (!fs.existsSync(fileDirectory)) {
fs.mkdirSync(fileDirectory);
}
Expand Down

0 comments on commit d119274

Please sign in to comment.