Link Roundup: Technology
npx, Hashbase, GatsbyJS, emotion and historie

Link Roundup: Technology

npx, Hashbase, GatsbyJS, emotion and historie

Bi-weekly we collect some technology related links to share with you. These will often mirror work we are currently engaged in, or tools we are using to improve our workflow. Our hope is that at least one might help you enhance your technology stack, or reduce friction in your daily work.

a new binary from npm

npx is definitely the most exciting new tool in my shell. I’ve been following along as Kat Marchán, npm CLI engineer and primary contributor for npx, has been publishing gifs and screenshots on twitter. I had barely gotten an opportunity to experiment with the module before it was packaged and shipped with npm@5.2.0. It’s insanely useful, and you should read the great introduction on Medium. The post includes a few of the gifs showing npx in action.

packages I like to use with npx

For me, npx works best in two use cases:
  1. executing local module binaries without any hacky $PATH fiddling
  2. ‘one time’ scripts that you don’t want locally, but you always want up to date
Here are a few modules I no longer have installed globally:
  • create-react-app: Create React apps with no build configuration.
  • http-server: A simple zero-configuration command-line http server
  • npm-check: Check for outdated, incorrect, and unused dependencies.
  • fixpack: A package.json file scrubber for the truly insane.

Additionally, you might find that some packages are not great to use directly with npx, but a tiny bit of shell scripting can really make your life easier. For instance, scaffolding up a new next project can be an easy one-liner:

npx -p next next init && npm i

This replaces the need to:

npm init -y
npm i next react react-dom
next init
# and now manually modify your package.json scripts

Finally, here is a community curated list of awesome npx resources

peer-to-peer web

I’ve been interested in the dat project since I was first exposed to it, but it seems to have made some really big strides recently with great user facing tools. The features of the Beaker Browser combined with the new #_hashbase service are making it easy to get started crafting P2P sites. Here is an article introducing Hashbase.

interesting npm modules

GatsbyJS

⚛️📄🚀 Blazing-fast static site generator for React

I have not built anything for production with this yet, but they have just shipped an official v1 (actually @1.2.0 at the time of this writing).

emotion

⚡️ The Next Generation of CSS-in-JS

I’m played with styled-components a bit, but this seems to be a drop in replacement that is considerably faster in production. Kye Hohenberger has nice introduction to emotion on Medium.

historie

A searchable history cli

I like using this as an alias: alias h=historie.