cdnjs provides only minified js files
I tied to use other providers,like npm, but that version doesn't work because it's intended to be used only on Node.js.
Can you publish non minified version on cdnjs?
Thank you.
Do you just need the content of the file? What is the need for a non-minified version on a CDN? Perhaps we should be providing source maps and we are not?
No I need non minified, for many reasons.
1) I use to deploy non minified files in my debug environment, because it's more easy to debug and find errors than use source map.
2) I deploy minified files with source map only in production enviroment for performance.
3) I prefer to use my js compiler based on google closure compiler for my custom optimizations.
4) This is the only open source library that I know that has not published non minified files and I can't understand why.
@marcoscaceres Perhaps food for thought when we update the CDN/doc website next? I'm not sure if there is some specific reason we haven't done this in the past?
No I need non minified, for many reasons.
FYI: Of course if you have Node.js locally you can build it yourself (non-minified) fairly easily:
node tools/build.js -t node
Yes, we should see if it's possible to deploy a non-minified version.
@OrbintSoft, you can always get the non-minified version doing what @OrbintSoft suggested.
@isagalaev IF we simply fix the build script so -t cdn splits out a few more files, will those automagically be pushed to the CDN also by the build process?
This is the only open source library that I know that has not published non minified files and I can't understand why.
Do most ship 100s of individual JS files? Are you wanting ALL of those the files to be in both minified and non-minified forms, or just the base highlightjs.js file?
FYI - You can look at the built files from npm via unpkg
For example, here's the unminified highlight.js:
https://unpkg.com/highlight.js/lib/highlight.js
Also, I think the node build process that would make sense is to use browser or cdn as the --target and pass in --no-compress like this:
node tools/build.js --target browser --no-compress
Which will build an unminified highlight.pack.js
We're just going to build both always for the CDN (minified and not). And the CDN files are different than the NPM files, so just fetching the files from unpkg doesn't work for someone why truly needs CDN builds.
Most helpful comment
We're just going to build both always for the CDN (minified and not). And the CDN files are different than the NPM files, so just fetching the files from unpkg doesn't work for someone why truly needs CDN builds.