You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Offer an option to minify the CSS or HTML output. This would allow red-perfume to be used more holistically as a single "all-in-one" build tool for smaller projects.
Clean-CSS and Sass both seemed like viable options that did minimal mutating of the input CSS during minification.
Of the two, Sass was slightly faster, and we also have plans to add Sass support in the future, so might as well avoid extra dependencies that do the same thing.
Evaluate HTML minification libraries
👎 - Parse5 is used for atomization, but has no minification features built in, other than AST manipulation by hand.
👎 - html-minifier seems to be by-far the most popular option (there's like a million fork-and-publish npm modules of it). It ships with Clean-CSS, UglifyJS, and Relate URL, since anything can be embedded in an HTML file. So if we go this route, it sort of chooses our tooling for CSS/JS minification for us. These aren't bad choices though.
👎 - html-crush is self-contained, which I really like, but looks to be using import x form y which would severely limit backwards Node compatibility. It is also part of a GIANT mono repo 🙄 so trying to find release history on it will be a huge fucking pain.
🤷♀️ - I could fork off of HTML-Minifier-Terser to swap Clean-CSS for Sass. Maybe even submit a PR back to them to see if they want to make that the default. Assuming they have good tests in place, this could be a good way to evaluate both tools for the minification output.
Though probably possible, this doesn't seem worth the effort, probably best to just do HTML-Minifier-Terser with the Clean-CSS option built in.
Evaluate JS/JSON minification libraries
👍 - For JSON files the built in JSON.stringify(obj) is probably all we'd need
👎 - UglifyJS - Easy, old school, and doesn't support ES6+ just like me, love it, but can't use it, cuz, like seriously, it doesn't understand let or const. Sorry dude.
👍 - Terser - I've used this before and it was pretty painless, nice and self-contained
Add it as an option to the API (I think each section of a task could have it's own minification option for JS/CSS/HTML)
Default should have minification turned off, but allow users to opt-in via a boolean in the API
Document API
Write tests for new code
The text was updated successfully, but these errors were encountered:
Offer an option to minify the CSS or HTML output. This would allow
red-perfume
to be used more holistically as a single "all-in-one" build tool for smaller projects.import x form y
which would severely limit backwards Node compatibility. It is also part of a GIANT mono repo 🙄 so trying to find release history on it will be a huge fucking pain.JSON.stringify(obj)
is probably all we'd needlet
orconst
. Sorry dude.The text was updated successfully, but these errors were encountered: