-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add docs script to remove unwanted files (#1139)
* feat: add script to remove unwanted docs files * chore: changeset --------- Co-authored-by: danielbate <--global>
- Loading branch information
1 parent
ee939fb
commit 51d13e3
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { unlink } from 'fs'; | ||
import { join } from 'path'; | ||
|
||
/** | ||
* Post build script to trim off undesired leftovers from Typedoc. | ||
*/ | ||
const docsDir = join(__dirname, '../src/'); | ||
const filesToRemove = ['api/modules.md']; | ||
const { log } = console; | ||
|
||
filesToRemove.forEach((filePath) => { | ||
const fullFilePath = join(docsDir, filePath); | ||
unlink(fullFilePath, (err) => { | ||
if (err) throw err; | ||
log(`Removed ${fullFilePath}`); | ||
}); | ||
}); |