-
Notifications
You must be signed in to change notification settings - Fork 264
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
Try supporting Blueprints written in TOML #1684
base: trunk
Are you sure you want to change the base?
Conversation
This is just an exploratory PR. If we want this, we'll at least need to update the Blueprints Builder as well. |
Adding the smol-toml dependency adds 40K to the from the built |
Thank you for exploring this! Let's hold on with merging for now, but let's keep it around for the time when we focus on the configuration more. What I already like:
What I wonder about:
❤️ |
That sounds good. Moved to "Future work".
I like this too!
These are good questions. Offhand, it just seems like this is a more human-friendly format that can be parsed to a data structure that is similar to those derived from JSON and YAML. Is there anything particular you had in mind? One possible drawback for TOML authoring is a lack of autocomplete support compared to what we get from JSON + JSON Schema. But it seems possible to use a JSON schema to hint at the expected structure of a TOML doc. This is discussed a bit here in the TOML repo.
😄 |
680cd19
to
2e376d2
Compare
Motivation for the change, related issues
@adamziel mentioned the possibility of supporting Blueprints written in TOML:
WordPress/blueprints-library#114
Implementation details
This PR adds a dependency on the smol-toml library and simply tries parsing as TOML when JSON parsing fails.
Testing Instructions (or ideally a Blueprint)
If we want this, we need unit tests, but for now, you can test locally with:
npm run dev