PrismJS / prism

Lightweight, robust, elegant syntax highlighting.
https://prismjs.com
MIT License
12.35k stars 1.29k forks source link

Add auto-minification #1686

Open RunDevelopment opened 5 years ago

RunDevelopment commented 5 years ago

As discussed here.

ExE-Boss commented 5 years ago

I would still prefer if the master branch were to only contain sources and the minified files would only be generated for npm publish and such, but that probably wouldn’t work well with Bower.

RunDevelopment commented 5 years ago

@ExE-Boss This also won't work well for the download page.

kucharzyk commented 2 years ago

It would be also usefull with webjars.

Now I can use all minified files excapt prism.js which is huge.

    <script src="/webjars/prismjs/1.27.0/prism.js"></script>
    <script src="/webjars/prismjs/1.27.0/components/prism-java.min.js"></script>
    <link href="/webjars/prismjs/1.27.0/themes/prism-tomorrow.min.css" rel="stylesheet">
    <script src="/webjars/prismjs/1.27.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
    <link href="/webjars/prismjs/1.27.0/plugins/line-numbers/prism-line-numbers.min.css" rel="stylesheet">

It would be great to add minified version of prism.js

mAAdhaTTah commented 2 years ago

@kucharzyk Replace prism.js with components/prism-core.min.js. prism.js is core + the web languages (HTML, CSS, JS).


If we ever wanted to go source-only in the repo, that would also probably have to apply to the site as well.

kucharzyk commented 2 years ago

Thanks @mAAdhaTTah

I just have to replace prism.js to prism-core.min.js and prism-clike.min.js and it works