-
Notifications
You must be signed in to change notification settings - Fork 567
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 'json/flat' format #138
Labels
Comments
Looking into it, interesting! |
Merged, closing |
When using |
Yes, by adding a name transform that converts token names to camelCase E.g. {
"source": [
"tokens.json"
],
"platforms": {
"json": {
"transforms": [
"name/camel"
],
"buildPath": "build/json/",
"files": [
{
"destination": "vars.json",
"format": "json/flat"
}
]
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From the discussion on #58 , we want to add different types of JSON formatting for different purposes. This format should output a JSON string that only has 1 level where the keys are the property name and the value is the property value. For example, this style dictionary JSON:
Would output this in the 'json/flat' formatter:
You can have a look at how the other formatters are written to see how to write a formatter and where it should go.
Make sure to include proper jsdoc comments and unit test!
The text was updated successfully, but these errors were encountered: