Skip to content

How to build a custom PrismJS as part of a site build? #3067

Answered by RunDevelopment
Zinfidel asked this question in Q&A
Discussion options

You must be logged in to vote

is there a way to somehow automate the process of npm run build > npm run start > Click Download > get files?

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.

On getting …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Zinfidel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants