-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: typedoc improvements #1734
base: main
Are you sure you want to change the base?
Conversation
"sort": ["kind", "required-first", "alphabetical"], | ||
"externalSymbolLinkMappings": { | ||
"@electron/notarize": { | ||
"NotaryToolCredentials": "https://erickzhao.github.io/notarize/types/NotaryToolCredentials.html" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONOTMERGE: let's merge in electron/notarize#199 first!
const replaceRef = /^refs\/(head|tag)s\// | ||
|
||
function gitRevisionFromGitHubRef () { | ||
const githubRef = process.env.GITHUB_REF | ||
if (githubRef) { | ||
return githubRef.replace(replaceRef, '') | ||
} | ||
} | ||
|
||
const gitRevision = process.argv[2] || gitRevisionFromGitHubRef() | ||
if (gitRevision) { | ||
if (/^[0-9a-f]+$/i.test(gitRevision)) { | ||
config.gitRevision = gitRevision | ||
} else if (gitRevision.startsWith('v')) { | ||
config.includeVersion = true | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: I'm pretty sure this is why I used the JS API instead of the CLI.
"out": "./typedoc", | ||
"excludeInternal": true, | ||
"sort": ["kind", "required-first", "alphabetical"], | ||
"externalSymbolLinkMappings": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: oh, they finally added this?? Amazing
Do we also need to add explicit external link config for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving just so that you can merge when you want to!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1734 +/- ##
==========================================
- Coverage 89.28% 89.06% -0.23%
==========================================
Files 17 17
Lines 905 905
Branches 187 187
==========================================
- Hits 808 806 -2
- Misses 61 62 +1
- Partials 36 37 +1 ☔ View full report in Codecov by Sentry. |
Cleanup PR based on learnings from the TypeDoc PRs.
npx typedoc
rather than JavaScript API removes legacybuild_docs.js
from code. Their JavaScript API has minimal documentation, and most options are available viatypedoc.json
configuration anyways.externalSymbolLinkMappings
to show links to types available via external Electron packages (e.g. get and notarize).Tag changes:
@example
tag.[[link tag syntax]]
to use{@link tag syntax}
.@interface
to expand utility types whenever possible (e.g. instead ofOmit<TypeA, 'KeyB' | 'KeyC'>
, adding the@interface
tag makes it so that all ofTypeA
's properties are displayed in the API documentation excludingKeyB
andKeyC
.@internal
andexcludeInternals
to hide types that should not be used by end users of Electron Packager.