diet-ng icon indicating copy to clipboard operation
diet-ng copied to clipboard

Minifying CSS and Javascript templates

Open andrewbenton opened this issue 7 years ago • 2 comments

As a user and developer, I find that hand-written CSS and JS, both from files and filters, have a relatively heavy load compared to the already condensed HTML that diet produces. I would like to be able to emit minified CSS and JS to the page. Even something to strip indentation and spaces would contribute a lot.

andrewbenton avatar Apr 03 '17 16:04 andrewbenton

You can use external tool for this. There is preBuildCommands in dub.json, which are runned before building.

diet is just an another way to write HTML. It has nothing to do with CSS or JS.

azbukagh avatar Apr 03 '17 18:04 azbukagh

That's true, but being able to do the minification at runtime would also be useful and make the library more friendly to non-expert users of dub.

andrewbenton avatar Apr 10 '17 09:04 andrewbenton