-
-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(website): Fix typedoc source links when deployed through vercel
This also fixes the issue where prebuild-docs is called twice since it looks like the `pre` hook is enabled for this even if it isn't a "native" npm script.
- Loading branch information
Showing
6 changed files
with
30 additions
and
5 deletions.
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
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
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,13 @@ | ||
import { execSync } from "child_process"; | ||
import log from "loglevel"; | ||
|
||
export function typedoc(): void { | ||
const commitSha = process.env.VERCEL_GIT_COMMIT_SHA; | ||
let command = "typedoc"; | ||
if (commitSha) { | ||
command = `${command} --sourcefile-url-prefix "https://github.com/mlaursen/react-md/blob/${commitSha}/"`; | ||
} | ||
|
||
log.info(command); | ||
execSync(command, { stdio: "inherit" }); | ||
} |
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