13 npm Tricks for Faster JavaScript Development

Speed up your JavaScript development workflow with npm and package.json

Bret Cameron
9 min readJun 21, 2019

Every day, millions of developers reach for npm (or Yarn) for their JavaScript projects. Running commands like npm init or npx create-react-app has become the go-to way to begin almost any JavaScript project, whether you’re building code for the client-side or server-side — or even if you’re building a desktop app.

But there’s a lot more to npm than initialising projects or installing packages. In this article, we’ll discuss 13 tricks to get the most out of npm: from simple shortcuts to custom npm init scripts.

Since many of us use npm every day, even saving a small amount of time could make a significant difference in the long run. These tricks are aimed at beginner and intermediate developers, but even if you’re an experienced developer, I hope you still find one or two features that you hadn’t encountered before.

Finally, if you’re completely new to npm, it comes bundled with Node.js, which you can install at https://nodejs.org/en/. If you’re on Windows, I recommend installing Git Bash to follow along. Let’s dive in.

1. Learn the Essential Shortcuts

--

--

Bret Cameron

Writer and developer based in London. On Medium, I mainly write about JavaScript, web development and Rust 💻