How to build a custom PrismJS as part of a site build? #3067
-
I want to start off by saying that I am not a webdev person at all, and I am deep into territory I understand little about. I have implemented a custom language definition that I'd like to contribute to a site that uses Prism. Let's assume for the moment that it's not possible to get it accepted as an official addition to the Prism website (more on that later). Right now, I have managed to stumble my way through the build process and have discovered that, after running So, my general question: is there a way to somehow automate the process of On getting my lang def in officially: It's possible but I'm not committed to making it a reality. It's for a weird niche language called AviSynth, the definition isn't very good, and the language is very strange in its usage so a lot of style choices I made are very "opinion-territory". |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, there isn't. (We do have #2618 but I will close that in the future). The download page implements a custom bundler. Programmatically using it or adding languages to it is not possible. We are very aware that this is an issue. One of the key features of Prism v2 will be that all of Prism language definitions are compatible with widely-used bundlers. We plan to remove the custom bundler and use a bundler (e.g. rollup) instead for the download. This will also support thrid-party languages, so you will the be able to make a little script that create a custom bundle.
You can also open a language request for AviSynth and say: "I'm not doing a PR but here is a basic language definition for anyone that wants to work on it and make a PR". |
Beta Was this translation helpful? Give feedback.
No, there isn't. (We do have #2618 but I will close that in the future).
The download page implements a custom bundler. Programmatically using it or adding languages to it is not possible.
We are very aware that this is an issue. One of the key features of Prism v2 will be that all of Prism language definitions are compatible with widely-used bundlers. We plan to remove the custom bundler and use a bundler (e.g. rollup) instead for the download. This will also support thrid-party languages, so you will the be able to make a little script that create a custom bundle.