Skip to content

Commit b80c285

Browse files
feat: support typedoc.json and tsconfig.typedoc.json. upgrade to latest deps
1 parent c7c7a09 commit b80c285

File tree

3 files changed

+78
-42
lines changed

3 files changed

+78
-42
lines changed

generate_docs.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,21 @@ const kebob = (string) => string
1919

2020
const PACKAGE_JSON = JSON.parse(fs.readFileSync('./package.json'));
2121
const TS_CONFIG = JSON.parse(fs.readFileSync('./tsconfig.json'));
22-
const TYPEDOC_CONFIG = JSON.parse(fs.readFileSync('./typedoc.json'));
22+
const TYPEDOC_CONFIG_FILENAME = getTypedocConfigFilename();
23+
const TYPEDOC_CONFIG = JSON.parse(fs.readFileSync(TYPEDOC_CONFIG_FILENAME));
2324
const PACKAGE_DIR = process.cwd();
2425
const DOWNSTREAM_CACHE = path.join(PACKAGE_DIR, '.downstream_cache');
2526
const DOCGEN_DIR = tmp.dirSync().name;
2627
const DOCGEN_PACKAGE_DIR = path.join(DOCGEN_DIR, kebob(PACKAGE_JSON.name));
2728

29+
function getTypedocConfigFilename() {
30+
return ['./typedoc.json', 'tsconfig.typedoc.json'].find(filename => fs.existsSync(filename));
31+
}
32+
2833
const requiredKeys = [ 'typedoc', 'typedoc.generateOptions' ];
2934
const missing = requiredKeys.find(key => !has(TYPEDOC_CONFIG, key));
3035
if (missing) {
31-
console.error(`typedoc.json does not contain configuration key: "${missing}"`);
36+
console.error(`${TYPEDOC_CONFIG_FILENAME} does not contain configuration key: "${missing}"`);
3237
process.exit(1);
3338
}
3439

@@ -63,9 +68,9 @@ includes.forEach(include => {
6368
publishYalcPackage(path.join(DOCGEN_DIR, kebob(package)), repo, flags);
6469
});
6570

66-
// symlink node_modules, package.json, typedoc.json into temp dir
71+
// symlink node_modules, package.json, tsconfig.typedoc.json into temp dir
6772
shelljs.ln('-s', path.join(PACKAGE_DIR, 'package.json'), path.join(DOCGEN_DIR, 'package.json'));
68-
shelljs.ln('-s', path.join(PACKAGE_DIR, 'typedoc.json'), path.join(DOCGEN_DIR, 'typedoc.json'));
73+
shelljs.ln('-s', path.join(PACKAGE_DIR, TYPEDOC_CONFIG_FILENAME), path.join(DOCGEN_DIR, TYPEDOC_CONFIG_FILENAME));
6974
shelljs.mkdir(path.join(DOCGEN_DIR, 'node_modules'));
7075
fs.readdirSync(path.join(PACKAGE_DIR, 'node_modules')).forEach(module => {
7176
const source = path.join(PACKAGE_DIR, 'node_modules', module);

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"util": "./util.js"
3030
},
3131
"dependencies": {
32-
"check-peer-dependencies": "1.0.8",
32+
"check-peer-dependencies": "1.0.9",
3333
"conventional-changelog": "^3.1.18",
3434
"conventional-changelog-ui-router-core": "^1.4.2",
3535
"find-parent-dir": "^0.3.0",
@@ -43,12 +43,12 @@
4343
"shx": "^0.3.1",
4444
"tmp": "^0.1.0",
4545
"tweak-sourcemap-paths": "0.0.4",
46-
"typedoc": "0.15.6",
47-
"typedoc-plugin-external-module-name": "2.1.0",
48-
"typedoc-plugin-internal-external": "2.0.2",
49-
"typedoc-plugin-ui-router": "2.0.0",
46+
"typedoc": "0.16.7",
47+
"typedoc-plugin-external-module-name": "3.0.0",
48+
"typedoc-plugin-internal-external": "2.1.1",
49+
"typedoc-plugin-ui-router": "2.0.1",
5050
"ui-router-typedoc-themes": "1.0.2",
51-
"yalc": "^1.0.0-pre.34",
52-
"yargs": "^15.0.2"
51+
"yalc": "^1.0.0-pre.35",
52+
"yargs": "^15.1.0"
5353
}
5454
}

yarn.lock

Lines changed: 62 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ chalk@^2.4.1:
133133
escape-string-regexp "^1.0.5"
134134
supports-color "^5.3.0"
135135

136-
check-peer-dependencies@1.0.8:
137-
version "1.0.8"
138-
resolved "https://registry.yarnpkg.com/check-peer-dependencies/-/check-peer-dependencies-1.0.8.tgz#963c332606b18953deed887732408d6493077f15"
139-
integrity sha512-ScnUImTZnbdijUMIdMAVzx4L+o7IBqpHl8uESmG6wG63de8Gb2r2/ehHssRGPRKnrLarBEyEYqbervFlmlUu8w==
136+
check-peer-dependencies@1.0.9:
137+
version "1.0.9"
138+
resolved "https://registry.yarnpkg.com/check-peer-dependencies/-/check-peer-dependencies-1.0.9.tgz#b12253de63acd824b0c2d8bf4f6d89315e80f9e7"
139+
integrity sha512-Mqd0i+SipSvkugBT3PajpYCBJaQt/VPYQwbd1z2R0ISTJh+f/3+LaQCG8Gjb8a2TS+2CKsa1S5G4DSWcJLCfRg==
140140
dependencies:
141141
resolve "^1.14.1"
142142
semver "^7.1.1"
@@ -610,6 +610,17 @@ handlebars@^4.4.0, handlebars@^4.5.3:
610610
optionalDependencies:
611611
uglify-js "^3.1.4"
612612

613+
handlebars@^4.7.2:
614+
version "4.7.2"
615+
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.2.tgz#01127b3840156a0927058779482031afe0e730d7"
616+
integrity sha512-4PwqDL2laXtTWZghzzCtunQUTLbo31pcCJrd/B/9JP8XbhVzpS5ZXuKqlOzsd1rtcaLo4KqAn8nl8mkknS4MHw==
617+
dependencies:
618+
neo-async "^2.6.0"
619+
optimist "^0.6.1"
620+
source-map "^0.6.1"
621+
optionalDependencies:
622+
uglify-js "^3.1.4"
623+
613624
has-flag@^3.0.0:
614625
version "3.0.0"
615626
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
@@ -846,7 +857,7 @@ lodash.templatesettings@^4.0.0:
846857
dependencies:
847858
lodash._reinterpolate "~3.0.0"
848859

849-
lodash@^4.17.15:
860+
lodash@^4.1.2, lodash@^4.17.15:
850861
version "4.17.15"
851862
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
852863
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
@@ -1538,46 +1549,49 @@ tweak-sourcemap-paths@0.0.4:
15381549
glob "^7.1.6"
15391550
yargs "^15.0.2"
15401551

1541-
typedoc-default-themes@^0.6.3:
1542-
version "0.6.3"
1543-
resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.6.3.tgz#c214ce5bbcc6045558448a8fd422b90e3e9b6782"
1544-
integrity sha512-rouf0TcIA4M2nOQFfC7Zp4NEwoYiEX4vX/ZtudJWU9IHA29MPC+PPgSXYLPESkUo7FuB//GxigO3mk9Qe1xp3Q==
1552+
typedoc-default-themes@^0.7.2:
1553+
version "0.7.2"
1554+
resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz#1e9896f920b58e6da0bba9d7e643738d02405a5a"
1555+
integrity sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==
15451556
dependencies:
15461557
backbone "^1.4.0"
15471558
jquery "^3.4.1"
15481559
lunr "^2.3.8"
15491560
underscore "^1.9.1"
15501561

1551-
typedoc-plugin-external-module-name@2.1.0:
1552-
version "2.1.0"
1553-
resolved "https://registry.yarnpkg.com/typedoc-plugin-external-module-name/-/typedoc-plugin-external-module-name-2.1.0.tgz#25f108e99673ad34f3424719c10c299ee50e92f0"
1554-
integrity sha512-uYYe1yj6COwgyhl3Of71lkkhbEw7LVBEqAlXVvd7b9INGhJq59M1q9wdQdIWfpqe/9JegWSIR9ZDfY6mkPedJg==
1562+
typedoc-plugin-external-module-name@3.0.0:
1563+
version "3.0.0"
1564+
resolved "https://registry.yarnpkg.com/typedoc-plugin-external-module-name/-/typedoc-plugin-external-module-name-3.0.0.tgz#d05604c3f8ac618320511b797e7b7ebaa75cb5e6"
1565+
integrity sha512-mTPO5Z+HIrM3b24A5/auFg+7ps7Y1jAGuccnOBhHcfUH3ZedInYdJuFcdisjDCW0i8BmRzCShB/KEpiG64oIWw==
1566+
dependencies:
1567+
lodash "^4.1.2"
1568+
semver "^7.1.1"
15551569

1556-
typedoc-plugin-internal-external@2.0.2:
1557-
version "2.0.2"
1558-
resolved "https://registry.yarnpkg.com/typedoc-plugin-internal-external/-/typedoc-plugin-internal-external-2.0.2.tgz#6ced269be25e1b23559443c2ce6a5483860d53c3"
1559-
integrity sha512-ZWDJvHT2TGIKSkOkyKc7fiSbz/mBHjXzppyzuQlEEAFJmi9YElEVRC34v0xJz4qGUtVT5nNw7gbD1umKowG4wQ==
1570+
typedoc-plugin-internal-external@2.1.1:
1571+
version "2.1.1"
1572+
resolved "https://registry.yarnpkg.com/typedoc-plugin-internal-external/-/typedoc-plugin-internal-external-2.1.1.tgz#fb3842bc2fe04dd7b3e77832a1da8251ba30f97d"
1573+
integrity sha512-T7f/zb4HDReKo8yhSyNUf6flhaWkIJx9/Od9BkNzXOBBaKs+TgWH5sLxQ5aeGa5IDDWohrtrFvHWm3D/RQq2Nw==
15601574

1561-
typedoc-plugin-ui-router@2.0.0:
1562-
version "2.0.0"
1563-
resolved "https://registry.yarnpkg.com/typedoc-plugin-ui-router/-/typedoc-plugin-ui-router-2.0.0.tgz#e498885d9dfd48cd6d5b819ee35b183dabe16bbd"
1564-
integrity sha512-okp4VXtjE99UszKVALhDeIjWBkMq8ZOuW1mbW51EqbOGi0gw4QBdXiAD6Bu7XT80j5yxy1gpf+2Syi+s3IoiKw==
1575+
typedoc-plugin-ui-router@2.0.1:
1576+
version "2.0.1"
1577+
resolved "https://registry.yarnpkg.com/typedoc-plugin-ui-router/-/typedoc-plugin-ui-router-2.0.1.tgz#4c84aa88696454ecb022cf4ff035a08f069fe3e8"
1578+
integrity sha512-bPLFrsvMUL5a7ZR8b1+Wvu+hEGB7dcBXhlBLgPy2JeiL97YwDDtEYYBEzo9IMAYoD/uscq4FLfWonxrOU63L6g==
15651579

1566-
typedoc@0.15.6:
1567-
version "0.15.6"
1568-
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.15.6.tgz#d99a1c3db8c87a00437a8a89a0df03f9dc1995ad"
1569-
integrity sha512-TC3j7HXFfyq0/NyUL9oLgEXhgO4U8Kd7iyRgagkG3XxehgTjn6w20uJ/Hif1KPB/65VQZ8uMYYyxFXNj9um5Ow==
1580+
typedoc@0.16.7:
1581+
version "0.16.7"
1582+
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.16.7.tgz#00975cbe37fba3a69ec4b42827683303d9c89da9"
1583+
integrity sha512-sNrLlaZ/aZHxA2rCURGf3g5YabGVwrujiwC6SCV/rgx3LFfZh+goUCatAAyTEDk7evuu6pJ0APGDSde1mSYegw==
15701584
dependencies:
15711585
"@types/minimatch" "3.0.3"
15721586
fs-extra "^8.1.0"
1573-
handlebars "^4.5.3"
1587+
handlebars "^4.7.2"
15741588
highlight.js "^9.17.1"
15751589
lodash "^4.17.15"
15761590
marked "^0.8.0"
15771591
minimatch "^3.0.0"
15781592
progress "^2.0.3"
15791593
shelljs "^0.8.3"
1580-
typedoc-default-themes "^0.6.3"
1594+
typedoc-default-themes "^0.7.2"
15811595
typescript "3.7.x"
15821596

15831597
typescript@3.7.x:
@@ -1675,10 +1689,10 @@ y18n@^4.0.0:
16751689
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
16761690
integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
16771691

1678-
yalc@^1.0.0-pre.34:
1679-
version "1.0.0-pre.34"
1680-
resolved "https://registry.yarnpkg.com/yalc/-/yalc-1.0.0-pre.34.tgz#137cfaded3417b7d66a69864a02aa691b6ef7856"
1681-
integrity sha512-Gqx567+kayHS1XbatQJcB9HnUcVMarWxPw8tPdVNte6oxZkC7pfoRKOCqjEGw8OkXioQd/Vrq+SbfkzAEDh98g==
1692+
yalc@^1.0.0-pre.35:
1693+
version "1.0.0-pre.35"
1694+
resolved "https://registry.yarnpkg.com/yalc/-/yalc-1.0.0-pre.35.tgz#c997d6694e6bdad3e988d6e183bc05158dd102fe"
1695+
integrity sha512-EGZN0Z+9nVzX8nWaEL4yRCNUNepGz7ouXa8eLA9orqtgwVv+iCtZGzhe3rngR71h01Xy2bwlDjJt0PsC5fkHoA==
16821696
dependencies:
16831697
fs-extra "^8.0.1"
16841698
glob "^7.1.4"
@@ -1725,6 +1739,23 @@ yargs@^15.0.2:
17251739
y18n "^4.0.0"
17261740
yargs-parser "^16.1.0"
17271741

1742+
yargs@^15.1.0:
1743+
version "15.1.0"
1744+
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.1.0.tgz#e111381f5830e863a89550bd4b136bb6a5f37219"
1745+
integrity sha512-T39FNN1b6hCW4SOIk1XyTOWxtXdcen0t+XYrysQmChzSipvhBO8Bj0nK1ozAasdk24dNWuMZvr4k24nz+8HHLg==
1746+
dependencies:
1747+
cliui "^6.0.0"
1748+
decamelize "^1.2.0"
1749+
find-up "^4.1.0"
1750+
get-caller-file "^2.0.1"
1751+
require-directory "^2.1.1"
1752+
require-main-filename "^2.0.0"
1753+
set-blocking "^2.0.0"
1754+
string-width "^4.2.0"
1755+
which-module "^2.0.0"
1756+
y18n "^4.0.0"
1757+
yargs-parser "^16.1.0"
1758+
17281759
yargs@^7.1.0:
17291760
version "7.1.0"
17301761
resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8"

0 commit comments

Comments
 (0)