@djockey/linkmapper-typedoc
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -5,4 +5,5 @@ #!/usr/bin/env node | ||
relativeURL: string; | ||
defaultLabel: string; | ||
}; | ||
export declare function getURLs(projectReflectionJSON: unknown): Promise<LinkMapping[]>; | ||
export {}; |
11
index.js
@@ -59,6 +59,15 @@ #!/usr/bin/env node | ||
const urls = new Array(); | ||
const seenDestinationURLPairs = new Set(); | ||
function visit(model) { | ||
if (model.url) { | ||
for (const alias of getAliases(model)) { | ||
urls.push({ linkDestination: alias, relativeURL: model.url }); | ||
const destURLPair = `${alias}:::${model.url}`; | ||
if (seenDestinationURLPairs.has(destURLPair)) | ||
continue; | ||
seenDestinationURLPairs.add(destURLPair); | ||
urls.push({ | ||
linkDestination: alias, | ||
relativeURL: model.url, | ||
defaultLabel: model.name, | ||
}); | ||
} | ||
@@ -65,0 +74,0 @@ } |
12
index.ts
@@ -18,2 +18,3 @@ #!/usr/bin/env node | ||
relativeURL: string; | ||
defaultLabel: string; | ||
}; | ||
@@ -89,6 +90,15 @@ | ||
const seenDestinationURLPairs = new Set<string>(); | ||
function visit(model: any) { | ||
if (model.url) { | ||
for (const alias of getAliases(model)) { | ||
urls.push({ linkDestination: alias, relativeURL: model.url }); | ||
const destURLPair = `${alias}:::${model.url}`; | ||
if (seenDestinationURLPairs.has(destURLPair)) continue; | ||
seenDestinationURLPairs.add(destURLPair); | ||
urls.push({ | ||
linkDestination: alias, | ||
relativeURL: model.url, | ||
defaultLabel: model.name, | ||
}); | ||
} | ||
@@ -95,0 +105,0 @@ } |
{ | ||
"name": "@djockey/linkmapper-typedoc", | ||
"license": "MIT", | ||
"bin": "index.js", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"prepublish": "tsc -p .", | ||
@@ -6,0 +7,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
22051
9
0
209