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

@rescript/tools package #829

Merged
merged 12 commits into from
Oct 12, 2023
Merged

Conversation

aspeddro
Copy link
Contributor

A binary called restools with two subcommands. One for document generation and another for renalyze, see README.md

The package also exposes the Docgen module to decode from JSON

// Read JSON file and parse with `Js.Json.parseExn`
json->RescriptTools.Docgen.decodeFromJson

You can publish with the commit message publish tools by pushing to master.

@zth
Copy link
Collaborator

zth commented Oct 11, 2023

Looking great overall!

I think we can rely on the v11 variant representation here for the JSON format, and just require people to use v11. Seems like it'd clean things up a bit.

@aspeddro
Copy link
Contributor Author

Ready for review

@aspeddro aspeddro marked this pull request as ready for review October 11, 2023 23:18
Comment on lines +16 to +19
@tag("kind")
type detail =
| @as("record") Record(array<field>)
| @as("variant") Variant(array<constructor>)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't look right. Did you test this somehow? Anyway we can fix in a follow up perhaps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zth fixed in #833

Copy link
Collaborator

@zth zth left a comment

Choose a reason for hiding this comment

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

Great stuff, thank you very much! I have a couple of adjustments I'd like to make but I can make them in a separate PR.

@zth zth merged commit 6c305cc into rescript-lang:master Oct 12, 2023
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