Writing shell scripts with JavaScript

May 7, 2021 By Mark Otto 0

zx: A Tool for Writing Better Shell Scripts — Tired of turning to bash, Python or Ruby to throw together a quick script? Stick with the JavaScript you know and love – this makes it easier with some handy functions for calling other programs, processing their output and results, changing directory, etc.

Google

AWS Introduces ‘CloudFront Functions’ — Think (very) short running JavaScript functions right within Amazon CloudFront designed to rewrite, redirect, or otherwise work with incoming requests.

Amazon Web Services

Quick Bits

  • SpiderMonkey is Mozilla’s long standing JavaScript engine as used in Firefox and other projects. It now has an all new homepage and.. drum roll.. a logo for the first time ever.
  • Ben Beattie-Hood has released Modern TypeScript, an e-book aiming to raise money for the Australian Red Cross. This 18-minute video covers what’s in the book.
  • V8 9.1 is on the way. It’s one of the less feature packed releases but adds top level await by default (already the case in some users of V8, such as Blink), private brands check syntax by default, and some perf improvements.
  • Up and coming toolchain Rome has formed a company, raised some money, hired folks.
  • A look at what’s new in RxJS 7, the reactive extensions for JavaScript.

Releases

node-dev 7.0 — Zero-conf Node.js reloading.
Mocha 8.4 — JavaScript test framework.
vue-test-utils 1.2.0 — Utilities for testing Vue components.
Gatsby 3.4 — React based app framework.
Node.js 16.1.0

📖 Articles, Opinions & Tutorials

Dependency Managers Don’t Manage Your Dependencies — Christoph Nakazawa has kicked off a new series on JavaScript infrastructure by putting the role of tools like npm, Yarn, or pnpm into context and explaining how you can begin to ‘take ownership’ of your dependencies.

Christoph Nakazawa

▶  A Comparison of Five React Frameworks — In just 26-minutes, this video provides most of the information required to pick the right React framework from five top players in the space: CRA, Gatsby, Next.js, Blitz, and Redwood.

Leigh Halliday

🛠 Code & Tools

Mantine: A New React Component Library — An MIT licensed, TypeScript-based collection of around 60 components and hooks with native dark theme support and a focus on usability and accessibility. Plenty of documentation and examples – we like it. Oh, and they work with Preact too.

Mantine Team

Spotlight: A Lightbox Gallery Library — We first linked to this two years ago when it was new, now it’s more mature and boasts as being the ‘most easy to integrate’ lightbox gallery with no dependencies either. Demos here.

Nextapps GmbH

Fx: A Command-Line JSON Processing Tool — If you’ve got some files full of JSON that you want to process, Fx will slice and dice it however you want, including using JavaScript one-liners to add a bit of logic to the process.

Anton Medvedev

😂 A fun one.. or is it?

Think about what Math.min() and Math.max() might each return, then test it out.. or cheat and look at this tweet 😏