Wednesday, March 15, 2023

javascripts sans build systems

Great (and by great I mean good and agrees with my biases) article Writing Javascript without a build system - Julia Evans writes

I make a lot of small simple websites, I have approximately 0 maintenance energy for any of them, and I change them very infrequently.

My goal is that if I have a site that I made 3 or 5 years ago, I’d like to be able to, in 20 minutes:

  • get the source from github on a new computer
  • make some changes
  • put it on the internet

But my experience with build systems (not just Javascript build systems!), is that if you have a 5-year-old site, often it’s a huge pain to get the site built again.

And because most of my websites are pretty small, the advantage of using a build system is pretty small – I don’t really need Typescript or JSX. I can just have one 400-line script.js file and call it a day.

That meets my workflow (though "ashamedly" I often skip the git step and just adjust things on the server).

Someone one said (and I wish I could find the quote, this is a very rough paraphrase) that the Internet just has one big trick, getting information onto and off of someone else's server, and you really can do that with conceptually lightweight technologies! 

(Also see her list of things that used to be hard and are now easy - thank heavens for Let's Encrypt)    

---

Other unlrelated JS articles I'm catching up on:

use maps moreand objects less seems like a good idea though - like with typescript - I think many coders don't get how important syntactic sugar can be.

A personal history with React is interesting...  thinking about how Contexts now solve the props drilling problem.

JS/TS changes of the last 3 years

 ----
FOLLOWUP:
Here is a reddit discussion about that first link. I like fzammetti's approach, even though I tend to get by without even the npm file juggling. (I think essentially the serverside stuff, the PHP, takes care of that for me.)


No comments:

Post a Comment