-
Notifications
You must be signed in to change notification settings - Fork 7
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
Generate theme file #20
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I haven't looked at this in details, but adding code genration seems good to me, 👍 ! |
Cool, do you think it’s worth merging as it is? Or would you prefer to look over it first? |
I am fine with merging!
…On Wed, 28 Oct 2020 at 12:54, Aramis Razzaghipour ***@***.***> wrote:
Cool, do you think it’s worth merging as it is? Or would you prefer to
look over it first?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#20 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANB3M66XQ5GMKOMSEQBC3LSNAA5TANCNFSM4S7HJNKA>
.
|
This completely solves all the inconsistencies in trailing commas and indentation that were present in the previous manual JSON output. This refactor was long and tedious, but is better in the long term. It also allows switching to a minified output format relatively easily.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a theme generator as I described in #19. Theoretically, generating a theme has quite a few advantages:
I’ve only been able to exploit the first three of these at the moment, as I wanted to keep the generator as simple as possible to avoid spending too much time on it in case the PR is rejected. I also wanted to minimise the diff of the theme JSON file itself, which prevented me from making some changes. Instead, I think it’s better to make these changes after merging (if it gets merged) to show in the Git history that the theme wasn’t actually altered by the generator.
Todo if PR is merged
@generated
comment to theme JSON (1464a87)scope
s as arrays (at the momentscope
s with only one element are outputted as the scope itself, rather than an array with one element) (31de6fd)Style
s (which lets us convertStyle::as_json_value
to aFrom
implementation) (2f1b825)