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

add TypeDoc to project #148

Merged
merged 3 commits into from
Jan 15, 2021
Merged

add TypeDoc to project #148

merged 3 commits into from
Jan 15, 2021

Conversation

akash1810
Copy link
Member

@akash1810 akash1810 commented Jan 14, 2021

What does this change?

TypeDoc will generate a documentation site which we can publish to GitHub Pages.

A new script/docs script is added to view docs locally and script/release is updated to run gh-pages to publish the generated site to GitHub Pages.

Does this change require changes to existing projects or CDK CLI?

No.

How to test

  • Checkout branch
  • Run script/docs

How can we measure success?

Published documentation 🎉 .

This will also encourage us to annotate our code properly, as noted here.

Have we considered potential risks?

n/a

Images

Index Page

image

Example page for GuStack

image

Example page for GuStack w/out externals (AWS CDK properties) shown

image

@akash1810 akash1810 requested a review from a team January 14, 2021 23:08
Copy link
Contributor

@jamie-lynch jamie-lynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! 📚

typedoc.js Show resolved Hide resolved
script/release Outdated
@@ -9,6 +9,7 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
if npm whoami &>/dev/null; then
rm -rf ./lib
npm run release
npm run release:docs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the release command fails at the point of trying to push to main, I'm not sure if it will ever execute this line or if it will fail and exit before getting there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh great point! Thoughts on possible solutions?

  • Have a separate script and remember to run it
  • Publish to GH Pages automatically via GH Actions, triggered by the creation of a GH tag/release
  • npm run release || true to always have that statement exit cleanly
  • Something else

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd vote for the second one as:

  • I will forget to run a separate script
  • If it fails for another reason (like yesterday when the tests failed) we probably don't want to publish to docs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Added a GH Actions workflow file now, which should deploy documentation to GH Pages whenever a new release is created.

TypeDoc will generate a documentation site which we can publish to github pages.
@akash1810 akash1810 merged commit b793502 into main Jan 15, 2021
@akash1810 akash1810 deleted the aa-typedoc branch January 15, 2021 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants