Skip to content
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

📦 upgrade documentalist #2510

Merged
merged 1 commit into from
May 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/docs-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@blueprintjs/core": "^3.0.0-beta.0",
"@blueprintjs/docs-theme": "^3.0.0-beta.0",
"documentalist": "^1.2.0",
"documentalist": "^1.3.2",
"glob": "^7.1.2",
"highlights": "^3.1.1",
"marked": "^0.3.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/docs-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@blueprintjs/core": "^3.0.0-beta.0",
"@blueprintjs/select": "^3.0.0-beta.0",
"classnames": "^2.2",
"documentalist": "^1.2.0",
"documentalist": "^1.3.2",
"fuzzaldrin-plus": "^0.5.0",
"tslib": "^1.9.0"
},
Expand Down
13 changes: 4 additions & 9 deletions packages/docs-theme/src/components/documentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ export class Documentation extends React.PureComponent<IDocumentationProps, IDoc
return {
getDocsData: () => docs,
renderBlock: block => renderBlock(block, this.props.tagRenderers),
renderType: this.renderType,
renderType: hasTypescriptData(docs)
? type =>
linkify(type, docs.typescript, (name, _d, idx) => <ApiLink key={`${name}-${idx}`} name={name} />)
: type => type,
renderViewSourceLinkText: Utils.isFunction(renderViewSourceLinkText)
? renderViewSourceLinkText
: () => "View source",
Expand Down Expand Up @@ -236,14 +239,6 @@ export class Documentation extends React.PureComponent<IDocumentationProps, IDoc
Utils.safeInvoke(this.props.onComponentUpdate, activePageId);
}

private renderType = (type: string) => {
const { docs } = this.props;
let index = 0;
return hasTypescriptData(docs)
? linkify(type, docs.typescript, name => <ApiLink key={`${name}-${index++}`} name={name} />)
: type;
};

private updateHash() {
// update state based on current hash location
this.handleNavigation(location.hash.slice(1));
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2111,9 +2111,9 @@ dns-txt@^2.0.2:
dependencies:
buffer-indexof "^1.0.0"

documentalist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/documentalist/-/documentalist-1.2.0.tgz#0c543d812e27e15ba665b76cf0bb143b36d3acce"
documentalist@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/documentalist/-/documentalist-1.3.2.tgz#26f9a053c00e918d02c3f6865c8b314487427c71"
dependencies:
"@types/kss" "^3.0.0"
glob "^7.1.1"
Expand Down