News for hackers. Stuff that matters.
Re:TypeScript 3.0 by TeMPOraL on Tuesday September 04, 2018 @01:07PM (#17910681)
Count me in. I don't touch frontend if I can avoid it, and if I can't, I sometimes have to work with compiling to JS and bloated node-based stacks. But when I write any JS for myself, I tend to do it pure, with files delivered to the browser as written (no minification, no obfuscation).

Not sure why I do it this way. For some irrational reason, I just don't like modern web tools. I don't use LESS/SASS either, prefering LASS (S-expressions -> CSS compiler library) in Common Lisp projects, and raw CSS otherwise. Part of the reason might be that I just miss the days when you could learn from "View Source" in your browser. A different part might be is that I don't understand why modern compilation to JS requires downloading many dozens of megabytes in hundreds of Node dependencies. That's just ridiculous.

Re:TypeScript 3.0 by mercer on Tuesday September 04, 2018 @01:31PM (#17910945)
I'd say it's mostly irrational, but I do sort of get the feeling.

It's true that many people who use, say, webpack will also just indiscriminately use heavy packages, complicated SASS/LESS setups, and whatnot.

But that doesn't mean that using webpack means you have to do the other things. It's possible to use webpack and various other 'fancy' stuff without going crazy on the packages, and with sourcemaps you still get to 'view source'.

Personally I find that the benefits of at least some degree of compilation are well worth the potential drawbacks. I am quite conservative in pulling in packages, I regularly use tools that show me visually which things increase the size of my payload, and the result is pretty nice. I can't imagine going back to using multiple script tags to include multiple js files.

EDIT: I'll add that I do understand wanting to avoid all this. It probably does take a bunch of domain-specific knowledge to know what to do and not to do, and I myself have also been trying to avoid much of it by moving to the back-end.

Re:TypeScript 3.0 by TeMPOraL on Tuesday September 04, 2018 @01:39PM (#17911046)
I'd love to read a guide into modern web that focused on establishing a leanest possible solid foundation for further work. Like, "this is the minimum setup to get minification of your JS and CSS; add this to get auto-refresh on file change; ...". Everything I've read so far jumps straight into downloading hundreds of megabytes of NPM modules. I just don't feel comfortable with all that code doing God knows what, God knows why.
Re:TypeScript 3.0 by mercer on Tuesday September 04, 2018 @01:52PM (#17911182)
Yeah, agreed. It's definitely true that going down the Webpack/compilation road sort of automatically sends you down a path of heavy, complicated solutions. Maybe what you describe could be something I could finally decide to blog about :).
Re:TypeScript 3.0 by TeMPOraL on Tuesday September 04, 2018 @02:08PM (#17911369)
For the sake of all that's beautiful in this world, please do.
Re:TypeScript 3.0 by mercer on Wednesday September 05, 2018 @01:19AM (#17915197)
I like this one when it comes to avoiding Gulp/grunt and the like: https://css-tricks.com/why-npm-scripts/