Re: [dev] suckless too to minify CSS, JS and html

From: isabella parakiss <izaberina_AT_gmail.com>
Date: Fri, 18 May 2018 19:04:26 +0100

compilers considered harmful because they make the source unreadable

On 5/18/18, Hiltjo Posthuma <hiltjo_AT_codemadness.org> wrote:
> On Fri, May 18, 2018 at 05:22:43PM +0100, Martin Tournoij wrote:
>> On Fri, May 18, 2018, at 16:46, Thuban wrote:
>> > Does anyone has advice for a suckless tool to minify JS, CSS and HTML
>> > files? I use sed for now, but it might not be the best solution.
>> >
>> > Furthermore, I was wondering what is the opinion of the list about
>> > minifying CSS, JS
>> > and html files?
>> > - Do you minify on your websites ? Why ?
>> > - What tool do you use to do so?
>>
>> I wrote this a while ago: https://github.com/Carpetsmoker/singlepage
>>
>> The main goal isn't really to "minify" files, as such – although it can
>> do that – but more to bundle them in a single page. This allows me to
>> use the same CSS for several HTML documents while still serving a single
>> HTML document without any external dependencies (a concept that I like).
>>
>> As for my general thoughts on minification: use common sense. If you're
>> creating one of those pages with 3M of JavaScript then it probably makes
>> sense. If you're creating something more sane then it's probably just
>> wasted effort at best.
>>
>
> Don't create pages with 3MB of Javascript, that's insane.
>
> I think concatenation/bundling in one file is fine, but not minification,
> because it makes the source unreadable. Carefully evaluate what you
> actually
> use in the site. Don't use bloated Javascript (such as jQuery) and CSS
> frameworks
> (such as Bootstrap).
>
> Make sure to "gracefully fallback" so Javascript is not required.
>
> One of the latest trends in Javascript bundle compilation. For example have
> a
> look at the new Reddit layout. There all the CSS classnames are randomized.
>
> Stop this madness.
>
> --
> Kind regards,
> Hiltjo
>
>
Received on Fri May 18 2018 - 20:04:26 CEST

This archive was generated by hypermail 2.3.0 : Fri May 18 2018 - 20:12:19 CEST