-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically downloaded customised files #2404
Comments
We statically serve your website via Github pages, so I don't think we could even do these get requests even if we wanted to. The alternative doesn't seem nice either tho. |
Thanks for the information. Is there a higher level overview of how the customization tool works? e.g. to help reproduce it locally? The JavaScript source seems a bit convoluted. |
Yeah, the script does a bunch of things... The actual build process is quite easy. We just take the list of languages/plugins the user selected, pass it to (It also has to include That's the basics of what the build process is. Right now at least. It will be able to do more after #2162. I also want to add that |
It would be great to provide an |
Instead of an npm task, we could also do a simple CLI. This could be used like this:
We could also use a configuration file (maybe similar to this format?) instead of CLI arguments or both. |
Motivation
The feature where you can minify the code by selecting which languages you need support for before clicking 'download' is nice, but it would be great to do this automatically (e.g. to add to build tools).
Clicking the relevant checkboxes on the website generates a URL like
https://prismjs.com/download.html#themes=prism-funky&languages=markup+css+clike+javascript+haskell+protobuf+purebasic
And we can evidently automatically create this URL. But then the "Download JS" and "Download CSS" buttons have to be pressed manually to trigger the actual download.
Description
And endpoint or similar where I could download the CSS and JS files from a customised URL directly e.g.
GET https://prismjs.com/download.html#themes=prism-funky&languages=markup+css+clike+javascript+haskell+protobuf+purebasic?download=js
GET https://prismjs.com/download.html#themes=prism-funky&languages=markup+css+clike+javascript+haskell+protobuf+purebasic?download=css
Alternatives
Visiting the website manually or trying to reverse engineer the javascript that triggers the download button.
The text was updated successfully, but these errors were encountered: