Skip to content

Added themes.json and some extras#92

Open
RunDevelopment wants to merge 2 commits intoPrismJS:masterfrom
RunDevelopment:themes-json
Open

Added themes.json and some extras#92
RunDevelopment wants to merge 2 commits intoPrismJS:masterfrom
RunDevelopment:themes-json

Conversation

@RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Jan 12, 2020

In preparation for prism#2175, I added a way to get 1) all themes and 2) the name of each theme. So I added a themes.json with that information.

From here on it escalated a little.

Since themes.json and README.md both contained that same information, I added the author info to themes.json and made it so that gulp now generates the list of available themes from themes.json.

With those changes, I updated the "Added a new theme" section in README.md and the section got quite long, so I moved it into CONTRIBUTING.md.

And since I already added a file specifically for information for contributors, I might as well include a few guidelines and requirements we have for themes to guarantee that they work with Prism and its plugins.

But now we have rules with no way to enforce them! So I added a new check to gulpfile.js which using JSDom verifies that all themes fulfill all requirements.
And guess what! One existing theme didn't fulfill a requirement, so I fixed it.

That's how we got here.


Features:

  • New themes.json which contains basic information about all themes.
  • The "Available Themes" section is automatically generated.
  • New and expanded contributing guide.
  • New checks for themes to ensure compatibility with Prism and its plugins.

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.

1 participant