-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
303 changed files
with
4,625 additions
and
5,844 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
These folder is intended for internal dev purposes. | ||
|
||
For plugin examples please visit: | ||
|
||
- https://github.com/tgreyuk/typedoc-plugin-markdown-examples | ||
- https://github.com/tgreyuk/typedoc-vitepress-theme-example |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,14 @@ | ||
{ | ||
"extends": ["../../../stubs/typedoc.cjs"], | ||
"entryPoints": ["../../../stubs/src/packages/*"], | ||
"entryPointStrategy": "packages", | ||
"outputFileStrategy": "modules", | ||
"plugin": [ | ||
"../../../packages/typedoc-plugin-markdown/dist", | ||
"../../../packages/typedoc-vitepress-theme/dist" | ||
], | ||
"sidebar": { | ||
"collapse": false, | ||
"pretty": true | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,3 @@ | ||
# @devtools/fixtures | ||
|
||
A private package to run fixtures from the command line. |
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,151 @@ | ||
#!/usr/bin/env ts-node | ||
|
||
import { getPackageName } from '@devtools/helpers'; | ||
import { spawn } from 'child_process'; | ||
import { consola } from 'consola'; | ||
import * as fs from 'fs-extra'; | ||
import * as path from 'path'; | ||
import { Fixture } from './models'; | ||
|
||
const timeStart = new Date().getTime(); | ||
|
||
main(); | ||
|
||
async function main() { | ||
fs.removeSync(path.join(process.cwd(), 'test', 'fixtures', 'out')); | ||
|
||
const config: Record<string, Fixture> = await import( | ||
path.join(process.cwd(), process.argv[3]) | ||
); | ||
|
||
const fixtureCount = Object.entries(config.default).reduce( | ||
(prev, curr) => | ||
prev + curr[1].options.length * (curr[1].outputFileStragies?.length || 2), | ||
0, | ||
); | ||
|
||
consola.start( | ||
`[${getPackageName()}] Building ${fixtureCount} test fixtures...`, | ||
); | ||
|
||
Object.entries(config.default).forEach(([key, config]) => { | ||
const outputFileStrategies: ('members' | 'modules')[] = | ||
config.outputFileStrategies || ['members', 'modules']; | ||
outputFileStrategies.forEach((outputFileStrategy) => { | ||
config.options.forEach((optionGroup, index: number) => { | ||
const options = { | ||
outputFileStrategy, | ||
...config.commonOptions, | ||
...optionGroup, | ||
}; | ||
writeMarkdown( | ||
key, | ||
config.entryPoints, | ||
outputFileStrategy, | ||
options, | ||
'opts-' + Number(index + 1), | ||
); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
function writeMarkdown( | ||
key: string, | ||
entryPoints: string[], | ||
outputFileStrategy: 'members' | 'modules', | ||
options: any, | ||
optionDir: string, | ||
) { | ||
const fullPath = path.join( | ||
process.cwd(), | ||
'test', | ||
'fixtures', | ||
'out', | ||
key, | ||
outputFileStrategy, | ||
optionDir, | ||
); | ||
spawn( | ||
'typedoc', | ||
[ | ||
...[ | ||
'-options', | ||
path.join(__dirname, 'typedoc.cjs'), | ||
'-logLevel', | ||
'Warn', | ||
'-entryPoints', | ||
[`${process.cwd()}/test/fixtures/src/${entryPoints}`], | ||
'-out', | ||
fullPath, | ||
], | ||
...objectToOptions(options), | ||
], | ||
{ | ||
stdio: 'inherit', | ||
}, | ||
); | ||
} | ||
|
||
/*export function writeHtml( | ||
entryPoints: FixtureEntryPoints, | ||
outDir: FixtureOutputDir, | ||
) { | ||
const fullpath = `./test/out/html/${outDir}`; | ||
spawn( | ||
'typedoc', | ||
[ | ||
...[ | ||
'-options', | ||
`./stubs/typedoc.cjs`, | ||
'-logLevel', | ||
'Warn', | ||
'--media', | ||
'./stubs/media', | ||
'--includes', | ||
'./stubs/inc', | ||
'-entryPoints', | ||
`./stubs/${entryPoints}`, | ||
'-out', | ||
fullpath, | ||
], | ||
], | ||
{ | ||
stdio: 'inherit', | ||
}, | ||
); | ||
}*/ | ||
|
||
function objectToOptions(obj: any) { | ||
return Object.entries(obj).reduce( | ||
(prev: any, curr: any) => { | ||
if (Array.isArray(curr[1])) { | ||
return [ | ||
...prev, | ||
...curr[1].reduce((prev1, curr1) => { | ||
return [...prev1, ...[`-${curr[0]}`, curr1]]; | ||
}, []), | ||
]; | ||
} | ||
if (typeof curr[1] === 'object') { | ||
return [ | ||
...prev, | ||
...Object.entries(curr[1]).reduce((prev1: any, curr1: any) => { | ||
return [...prev1, ...[`-${curr[0]}.${curr1[0]}`, true]]; | ||
}, []), | ||
]; | ||
} | ||
return [...prev, ...[`-${curr[0]}`, curr[1]]]; | ||
}, | ||
['-plugin', 'typedoc-plugin-markdown'], | ||
); | ||
} | ||
|
||
process.on('exit', () => { | ||
consola.success( | ||
`[${getPackageName()}] Finished building fixtures in ${( | ||
(new Date().getTime() - timeStart) / | ||
1000 | ||
).toFixed(2)} seconds`, | ||
); | ||
}); |
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,6 @@ | ||
export interface Fixture { | ||
entryPoints: string; | ||
outputFileStragies?: ('members' | 'modules')[]; | ||
commonOptions: Record<string, any>; | ||
options: Record<string, any>[]; | ||
} |
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,11 @@ | ||
{ | ||
"name": "@devtools/fixtures", | ||
"version": "0.0.0", | ||
"private": true, | ||
"files": [ | ||
"/" | ||
], | ||
"bin": { | ||
"fixtures": "cli.ts" | ||
} | ||
} |
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,15 @@ | ||
module.exports = { | ||
cleanOutputDir: true, | ||
sourceLinkTemplate: 'http://source-url', | ||
tsconfig: process.cwd() + '/test/fixtures/tsconfig.json', | ||
externalSymbolLinkMappings: { | ||
typedoc: { | ||
Application: 'https://typedoc.org/api/classes/Application.html', | ||
}, | ||
typescript: { | ||
Promise: | ||
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise', | ||
URL: 'https://developer.mozilla.org/en-US/docs/Web/API/URL', | ||
}, | ||
}, | ||
}; |
2 changes: 1 addition & 1 deletion
2
dev-packages/generate-readmes/cli.ts → devtools/packages/generate-readmes/cli.ts
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
2 changes: 1 addition & 1 deletion
2
dev-packages/generate-readmes/package.json → ...ls/packages/generate-readmes/package.json
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
dev-packages/helpers/package.json → devtools/packages/helpers/package.json
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
2 changes: 1 addition & 1 deletion
2
dev-packages/prebuild-options/cli.ts → devtools/packages/prebuild-options/cli.ts
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
2 changes: 1 addition & 1 deletion
2
dev-packages/prebuild-options/package.json → ...ls/packages/prebuild-options/package.json
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
File renamed without changes.
Oops, something went wrong.