4 ms·
Yes, there is a lot of shit, but stick to ES2015+ and you'll be mostly fine. No reason to continue with the .cjs .mjs crap. Either set "type": "module" or use
by ravenstine 4y ago
Yes, there is a lot of shit, but stick to ES2015+ and you'll be mostly fine. No reason to continue with the .cjs .mjs crap. Either set "type": "module" or use Deno (the superior option) and don't look back. If others still want to use Common JS, that's their problem. Yeah, a lot of modules won't work out of the box because they're Common JS, and visa versa, but screw Common JS. That and goofy junkware like Gulp and Grunt which are overcomplicated, change their APIs frequently, and don't really do anything better than a Makefile. Ok, Gulp might be helpful if you're running Windows, but I pity those who still do web development on Windows without WSL2.
- andrew_ 4y agoGulp and Grunt? Are you a time traveler from 2012?
- jeroenhd 4y agoBoth still work fine to this day. I don't know what the exact (dis)advantages of the competing toolsets are, but if you know Gulp and Grunt then I don't see why you wouldn't use them.
- coredog64 4y agoWas helping an org migrate off of CloudFoundry and Grunt gave us no end of trouble. In the end, we wound up building with Node 8(!) and then praying that everything would still work with a 12.x runtime.
- andrew_ 4y agounless one is in need of piping files (and streams) in a complex and prolific way, npm scripts or a makefile can supplant Gulp/Grunt with much less overhead.
- ravenstine 4y agoYeah Grunt is pretty ancient but Gulp is still used in many places.
- Zardoz84 4y agoGulp it's really useful when your workflow gets out of what webpack, esbuild & cia expects
- azangru 4y agoLook at the source code of web.dev site :-) It's Eleventy with gulp for asset management. https://github.com/GoogleChrome/web.dev https://github.com/GoogleChrome/web.dev
- bluefirebrand 4y agoI worked on a project using Gulp and Grunt as recently as 2020. This was a product the company I was working for inherited from a merger. They bought the company for this product. It was a nightmare of bad software practices. Still using Gulp in 2020 was only the tip of the iceberg.
- toomanybeersies 4y agoAt least (I hope) you weren't still using Bower.
- jitl 4y ago¯\_(ツ)_/¯ used to build Typescript: https://github.com/microsoft/TypeScript/blob/main/Gulpfile.js https://github.com/microsoft/TypeScript/blob/main/Gulpfile.j...
- andrew_ 4y agoThat is freaking bananas. Thanks for sharing.
- aordano 4y agoGulp is practical to insert extra behavior if you have a multi-step build process and are allergic to Webpack. Just write a gulpfile and spawn whatever you need spawning, like some glorified bash that is already in JS so you don't need to manage more languages.
- deleted 4y ago[deleted]
- theteapot 4y ago2012 === bad. 2022 == awesome!
- klodolph 4y agoProblem is that a ton of random stuff breaks when you "type": "module". Unexpected stuff, like Prettier.
- BigJono 4y agoOh no, whatever will the world do without Prettier turning nicely formatted JS into a pile of unreadable shit because line 218 was 71 characters long instead of 69.
- ThalesX 4y agoI’ve recently had a PR that Prettier would add 2 extra whitespace and Lint would complain about it. And these were in the same build process. The resolution was for me to change my code…