Feature request: prismjs
divyanshu013 opened this issue · 3 comments
Not sure how tricky it might be to generate a prismjs theme as well. Thanks.
Thanks for logging, @divyanshu013 ! Looking over the Prism docs and it doesn't seem like it would be very hard at all.
Using https://github.com/mjswensen/themer/blob/master/cli/packages/themer-slack/lib/index.js as a guide for the render()
function, and https://github.com/PrismJS/prism/blob/master/themes/prism.css as a foundation for the Prism CSS theme, the template JS file would end up something like this:
module.exports = {
render: colors => Object.entries(colors).map(
([name, colorSet]) => Promise.resolve({
name: `themer-prism-${name}.css`,
contents: Buffer.from(`<Prism CSS theme here>`),
}),
),
};
@divyanshu013 , would you have any interest in submitting a PR with the basic implementation? If not, I can try and take a look when I have time.
Thanks, I can take a look but not sure about how soon. Will send a PR if I can make it work :)
Thanks again, @divyanshu013 ! 🙌 themer-prism@1.0.0 has been released to npm and is now also available in the Web UI.