Skip to content

Fix docs #1024

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

Merged
merged 5 commits into from
Nov 17, 2020
Merged

Fix docs #1024

merged 5 commits into from
Nov 17, 2020

Conversation

ethanshar
Copy link
Collaborator

@ethanshar ethanshar commented Nov 8, 2020

Description

We encounter (again) with issues with the doc generation.
Some components were missing from the docs site.

After some investigation, I found out that react-docgen failed to parsing typescript files of components with getter methods.
I tried to find to culprit, but unfortunately didn't find which package cause that.

Anyway, I decided to make some changes in the way we generate our docs

  • I excluded TS files
  • I added the deploy docs phase to our build (so now docs will be generated from the JS files after the TS build)
  • The docs will now be created during CI build (something we wanted to do for a while)
  • Fixed usage of _.chain, similar to what we did in private docs

Changelog

Fix issue with missing component in our docs site (Fix #1022)

@@ -32,7 +32,7 @@
"log": "react-native log-ios | grep 'ethan -'",
"docs:install": "(cd ./uilib-docs && rm -rf node_modules && rm -rf package-lock.json && npm install)",
"docs:deploy": "(cd ./uilib-docs && gatsby build --prefix-paths && gh-pages -d public --branch gh-pages)",
"docs:build": "(cd ./uilib-docs && gatsby build --prefix-paths)",
"docs:build": "(cd ./uilib-docs && npm install && gatsby build --prefix-paths && gh-pages -d public --branch gh-pages)",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't this deploy each time we build the docs (you removed that part from the notes)?
Also, is the CI calling npm run docs:build? Or should it be added to the build phase?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As you can see I scratch that in the PR description.
At first I called docs:build from the build script.
But it seems to not work and require more investigation.. so I dropped it for now.
docs:build is not being used at the moment.. but that should be the script we will want to run in CI once we'll make it work.

@@ -6,7 +6,7 @@
"author": "Kyle Mathews <[email protected]>",
"dependencies": {
"classnames": "^2.2.6",
"gatsby": "2.23.22-static-query-template.8",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you test this on production?
We have this open bug: gatsbyjs/gatsby#26038
(They want us to validate something but I haven't gotten around to it...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems to work now.
The current docs were generated from this branch.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure it has been, locally I had Button and I don't see it in production.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe someone had deployed the docs from master and "broke" it :/
I just triggered docs again from this branch and now you can see the Button

@ethanshar ethanshar requested a review from M-i-k-e-l November 13, 2020 08:52
@M-i-k-e-l M-i-k-e-l merged commit dbeda13 into master Nov 17, 2020
@ethanshar ethanshar deleted the infra/fix_docs branch March 8, 2021 09:02
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.

Missed Button component from documentation site
2 participants