Skip to content

Commit de608f6

Browse files
authored
chore(toolkit-lib): replace typedoc with api-extractor (#543)
Removes typedoc configuration in favor of api-extractor. We were running both in parallel for a transition period, but now only api-extractor is used. Also includes related updates to the toolkit-lib package configuration. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent b04ad30 commit de608f6

File tree

8 files changed

+6
-265
lines changed

8 files changed

+6
-265
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.ts

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,6 @@ const toolkitLib = configureProject(
773773
'@types/jest-when',
774774
'jest-when',
775775
'nock@13',
776-
'typedoc',
777776
'xml-js',
778777
],
779778
// Watch 2 directories at once
@@ -818,15 +817,6 @@ const toolkitLib = configureProject(
818817

819818
new TypecheckTests(toolkitLib);
820819

821-
// TypeDoc documentation publishing
822-
new S3DocsPublishing(toolkitLib, {
823-
docsStream: 'toolkit-lib',
824-
artifactPath: 'docs.zip',
825-
bucketName: '${{ vars.DOCS_BUCKET_NAME }}',
826-
roleToAssume: '${{ vars.PUBLISH_TOOLKIT_LIB_DOCS_ROLE_ARN }}',
827-
docType: DocType.TYPEDOC,
828-
});
829-
830820
// API Extractor documentation publishing
831821
new S3DocsPublishing(toolkitLib, {
832822
docsStream: 'toolkit-lib-api-model',
@@ -942,7 +932,6 @@ toolkitLib.npmignore?.addPatterns(
942932
'assets',
943933
'docs',
944934
'docs_html',
945-
'typedoc.json',
946935
'*.d.ts.map',
947936
// Explicitly allow all required files
948937
'!build-info.json',
@@ -969,14 +958,8 @@ toolkitLib.gitignore.addPatterns(
969958
'!test/_fixtures/**/cdk.out',
970959
);
971960

972-
// Add a command for the Typedoc docs
973-
const toolkitLibDocs = toolkitLib.addTask('docs', {
974-
exec: 'typedoc lib/index.ts',
975-
receiveArgs: true,
976-
});
977-
978961
// Add commands for the API Extractor docs
979-
const apiExtractorDocsTask = toolkitLib.addTask('api-extractor-docs', {
962+
const apiExtractorDocsTask = toolkitLib.addTask('docs', {
980963
exec: [
981964
// Run api-extractor to generate the API model
982965
'api-extractor run || true',
@@ -994,18 +977,9 @@ const apiExtractorDocsTask = toolkitLib.addTask('api-extractor-docs', {
994977
'cd dist/api-extractor-docs && zip -r -q ../api-extractor-docs.zip cdk',
995978
].join(' && '),
996979
});
997-
998980
// Add the API Extractor docs task to the package task
999981
toolkitLib.packageTask.spawn(apiExtractorDocsTask);
1000982

1001-
// When packaging, output the docs into a specific nested directory
1002-
// This is required because the zip file needs to have this structure when created
1003-
toolkitLib.packageTask.spawn(toolkitLibDocs, { args: ['--out dist/docs/cdk/api/toolkit-lib'] });
1004-
// The docs build needs the version in a specific file at the nested root
1005-
toolkitLib.packageTask.exec('(cat dist/version.txt || echo "latest") > dist/docs/cdk/api/toolkit-lib/VERSION');
1006-
// Zip the whole thing up, again paths are important here to get the desired folder structure
1007-
toolkitLib.packageTask.exec('zip -r -q ../docs.zip cdk', { cwd: 'dist/docs' });
1008-
1009983
toolkitLib.addTask('publish-local', {
1010984
exec: './build-tools/package.sh',
1011985
receiveArgs: true,

packages/@aws-cdk/toolkit-lib/.npmignore

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/toolkit-lib/.projen/deps.json

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/toolkit-lib/.projen/tasks.json

Lines changed: 3 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/toolkit-lib/package.json

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/toolkit-lib/typedoc.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)