sindresorhus / generate-github-markdown-css

Generate the CSS for github-markdown-css
MIT License
380 stars 77 forks source link

Expand functionality to better support theme variable exports #21

Closed jjspace closed 1 year ago

jjspace commented 1 year ago

Background

I was starting to try and tackle adding better support for all of GitHub's themes in the VSCode GitHub Markdown preview extension. Namely this issue: https://github.com/mjbvz/vscode-github-markdown-preview-style/issues/89. That lead me to realize it'd be easiest if I could export each of the theme's color variables by themselves to allow easier swapping between them. Looking into this tool I there wasn't a way to easily export the theme variables by themselves because of the applyColors function when in "single" mode. This whole change started as a way to add an option around that.

Summary

Throughout my changes I aimed to preserve the existing behavior for both the CLI and the API method. All existing calls to the function should behave as they used to and all calls to the CLI version should output the same results. I wanted to expand the functionality not change it.

I will admit the changes started to expand in scope quickly as I got into the flow of working on this so if it's better to break into multiple PRs or remove some of them I'd totally understand.

Testing

hyrious commented 1 year ago

LGTM.