4 ms·
I'm curious, who here has a development workflow such that compressing/minifying code via an ad-hoc web tool makes sense? I've always just included it as part o
by headcanon 9y ago
I'm curious, who here has a development workflow such that compressing/minifying code via an ad-hoc web tool makes sense? I've always just included it as part of a build process, or at the very least would pipe it into uglifyjs command line. I'm sure everyone's got their own needs but I just don't understand how that would be useful.
- derimagia 9y agoOnline tools that minify and touch code always scare me. It would be so easy for them to put stuff in there, like a crypto miner for example.
- themodelplumber 9y agoYou're touching up an old website for your old client and have just a few minutes to...ah, I wonder if there's a quick minimizer out there somewhere? That might be fun to try, and we did just add a bit more overhead to the site. I haven't done this exact thing, but I've done similar things many times. Not every project has or should have a build process. And unfortunately not all of them even have a command line...
- reificator 9y agoIf you don't have an established build process, I would consider a one-time minification of an established codebase to be a pretty poor decision. Either setup a trivial build script, or don't do it at all. EDIT: Clearly HN disagrees with me. Tell me, what does being a cowboy get you here? If it's a measurable performance boost, then as soon as you patch it again your site will seem slower. Unless you then manually minifiy again. And again. Until you setup a build script. If it's not a measurable performance boost, (And I doubt that you know either way because if you're not setting up a trivial build script then I highly doubt you're putting in the time to profile) then what do you get? The next person to come along gets to have a harder time debugging because you don't have source maps?
- Mandatum 9y agoI agree. Minify once it's released and you can test it quickly once to make sure there's no reference screw-ups, but as part of your development process - don't touch that file. I'd say most web developers follow this process though, I'd be interested to see statistics on minified sources. I'd say at least half of the websites I right-click view-source don't minify.
- stevenicr 9y agoand stats on how many times these minify and unminify sites have been used would be interesting. I've used them more than a dozen times. Some sites get the minification just to ramp up a google pagespeed number - not really for the end users - so why bother with a build process? Write some html, ftp. Then pagespeed numbers matter to some people and in some competitive industries - view source, web minify, ftp. done.
- reificator 9y agoBut again, if it's so important, then why leave it a manual process? If it's critical to the business needs, script it. If you need to do it every time you fix a bug, make it automatic.
- flukus 9y agoThere's a whole world of developers out their that can't automate anything their IDE doesn't support. For many hitting F5 is their build process: https://blog.codinghorror.com/the-f5-key-is-not-a-build-process/ https://blog.codinghorror.com/the-f5-key-is-not-a-build-proc...