[Pkg-javascript-devel] Replace 'yui-compressor' with 'uglifyjs'
Jonas Smedegaard
jonas at jones.dk
Mon Jan 18 08:49:59 GMT 2021
Quoting Marcelo Jorge Vieira (2021-01-18 03:02:51)
> What do you think about replace 'yui-compressor' with 'uglifyjs'.
>
> The latest yui-compressor was release on May 15, 2013.
>
> https://github.com/yui/yuicompressor/tags
> https://packages.debian.org/sid/yui-compressor
For projects where upstream does _not_ use YUI-compressor themselves, I
recommend to immediately switch to uglify-js 3.x.
For projects where upstream _does_ use YUI-compressor, I suggest to
cautiously try switch, but then make sure to test at least once the
resulting code by testing the minified files in a web browser: Maybe
upstream (even unknowingly) rely on specific behaviour/flaws of
YUI-compressor.
Beware that YUI-compressor also supports compressing CSS files. I
recomend replacing that with sassc: Sass takes Sass code as input
(serialized as either SASS or SCSS), but since SCSS is a strict superset
of CSS it can take CSS as input as well.
I do *not* recommend replacing JS compressor with Terser: I highly doubt
that YIU-compressor supports newer ES6 code as input which would be a
reason to use Terser instead of Uglify-js, and Terser is not up-to-date.
I do *not* recommend replacing CSS compressor with LESS.js: Unlike SCSS,
the LESS format is *not* a strict superset.
I do *not* recommend replacing CSS compressor with PostCSS: PostCSS can
do lots of things, raising the risk of doing some things wrong.
- Jonas
--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/
[x] quote me freely [ ] ask before reusing [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20210118/f075f915/attachment.sig>
More information about the Pkg-javascript-devel
mailing list