![]() This week, we’ve got a new way to script, a very special birthday boy, and a new package manager for your package manager’s package manger to manage. Welcome to #65.
Now kith Easy JavaScript-ingGoogle recently put the script back into JavaScript when they released zx — an unholy union of Bash and JavaScript. What does it do? Sometimes you’ve got a process that you’d like to automate with a little code. You could write it in pure Bash, but that’s complicated, the documentation is terrible, and your hair isn’t gray enough. Node is a little nicer to work with, but not as powerful as Bash. Zx (pronounced “zx”) combines the best parts of Bash and Node, giving you a simple-but-powerful automation tool that has a bunch of mini-tools built in. You’ve got Let me show you an example. Suppose I’m migrating my Node project from CommonJS to ESM. As I migrate, I need to rename my existing files from
Nice! Notice that
The magic of zx is in the You can run it by itself, pipe the results to the console, or put it the result in a variable and use it elsewhere in your script. The Bottom Line: If you’ve ever had a hard time writing Bash scripts, zx might be for you. It may say that it’s “not an officially supported Google product” at the bottom of the readme, but zx will probably last longer than Google Reader did (RIP in peace).
Just ship it. [sponsored] Retool can help you build internal tools 10x fasterIt finally happened. Your boss approached you and needs some “internal tools thrown together” because the suits upstairs want to make some “data-driven decisions.” No problem, you think, should only take a few days. But then you spend the next month hacking together a wide variety of your company’s data sources, only to realize at the last minute that you never considered auth, and (oh crap) the whole thing looks terrible. Should’ve used Retool. Retool started when a few developers realized that all internal tools are made up of the same basic pieces — tables, lists, charts, forms, maps, wizards (I’m a wot?), etc. So they made a rad product that abstracts away all the annoying parts of building those tools, while still giving you the flexibility to write custom JavaScript anywhere in the app. And thanks to their pretty generous free tier, I can finally tell my mom that I’m a 10x (internal tools) developer. 👉__Check it out__
…the schemas will align, ever so nicely TWIH — GraphQL is BornSix years ago this week, the data fetching prophecies were fulfilled when Facebook open-sourced GraphQL — a query language for APIs that differentiated itself from traditional REST APIs in a few meaningful ways:
In one way or another, all of these features were (and still are) designed to make the data fetching process a lot more intuitive for frontend developers and a lot more efficient for the apps themselves. Lee Byron wrote that he and his team originally created GraphQL because, at that time (back in 2012), Facebook’s native mobile apps needed a data API that was “powerful enough to describe all of Facebook, yet simple enough to be easy to learn and use by our product developers.” Turns out, that was a pretty compelling value prop to lots of other developers too, so they open sourced it in September 2015. Fast forward to today, and GraphQL is getting a cool 5.5 million npm downloads per week, while helping to spawn a few Cool Bits
|