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

Kk/auto generate api reference #135

Merged
merged 32 commits into from
Nov 30, 2021
Merged

Conversation

krzkaczor
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2021

⚠️ No Changeset found

Latest commit: be809ff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@hasparus hasparus force-pushed the kk/auto-generate-api-reference branch from 92273b8 to bd9e4fe Compare November 23, 2021 18:40
@hasparus
Copy link
Contributor

@krzkaczor could you take a look at this? There's still the case of encoding special characters, but it's some progress. I'll test it more thoroughly tomorrow morning, but I suppose it's ready for review.

Copy link
Contributor Author

@krzkaczor krzkaczor left a comment

Choose a reason for hiding this comment

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

Good progress! Still, there is some work to do on the readability of the output (see images, the former is so much easier to skim) but definitely, we are getting closer!

One note is that I think we will need to add a little bit of handcrafted configuration to the generator. For example not is a modifier, not a validator, and should be listed as such.

Previous:
image

Current:
image

packages/api-reference-generator/src/utils.ts Outdated Show resolved Hide resolved
packages/api-reference-generator/CHANGELOG.md Outdated Show resolved Hide resolved
packages/docs/api/api-reference.md Outdated Show resolved Hide resolved
packages/docs/api/api-reference.md Outdated Show resolved Hide resolved
@hasparus hasparus force-pushed the kk/auto-generate-api-reference branch from 69befa8 to fc9fea1 Compare November 29, 2021 15:41
@hasparus hasparus force-pushed the kk/auto-generate-api-reference branch from 429e1c8 to c40414c Compare November 30, 2021 12:12
@hasparus
Copy link
Contributor

We've reached the limit of parsing files by regex — I added a few hacks to make the API reference look good. I'm unhappy with it, but I suppose it's fine for now.

@hasparus hasparus force-pushed the kk/auto-generate-api-reference branch from f72d20f to 1948d94 Compare November 30, 2021 13:27
@hasparus
Copy link
Contributor

@hasparus hasparus marked this pull request as ready for review November 30, 2021 13:36
@hasparus hasparus force-pushed the kk/auto-generate-api-reference branch 2 times, most recently from bf93cd1 to 8a52bb8 Compare November 30, 2021 14:22
@hasparus hasparus force-pushed the kk/auto-generate-api-reference branch from 8a52bb8 to 2cc004a Compare November 30, 2021 14:23
Copy link
Contributor Author

@krzkaczor krzkaczor left a comment

Choose a reason for hiding this comment

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

LFG! I love how the new api reference reads.

I am not 100% sure if I like how matchers and validators got split up to different files - now implementation is in one file and docs in another :/ I have strong header files vibes. But I don't see an easy, better solution.

"build": "wsrun -temc build",
"build:noweb": "wsrun -x website -temc build",
"build": "wsrun -x website -temc build",
"build:website": "yarn workspace website build",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@krzkaczor krzkaczor merged commit 2ed1a8d into master Nov 30, 2021
@krzkaczor krzkaczor deleted the kk/auto-generate-api-reference branch November 30, 2021 21:22
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