npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fast-run

v2.1.0

Published

Executes scripts in your package.json much faster than NPM or Yarn, especially for projects using Yarn Workspaces. And with less typing.

Downloads

174

Readme

Run

Run executes scripts in your package.json file much faster than npm or yarn, especially for projects using Yarn Workspaces. And with less typing.

Speed

Here's an example on my medium-sized JS project with 22 workspace packages, running a script in my root package that just prints "hello world":

# NPM is reasonably fast, but doesn't support workspaces.
> time npm run hello
hello world
… 0.17s

# Yarn is bizarrely slow.
> time yarn run hello
hello world
… 0.63s

# Run supports workspaces and is twice as fast as NPM.
> time run hello
hello world
… 0.09s

Additionally, Yarn consumes 200MB of memory while your script is running, compared to 50MB for npm and Run. That's an extra 150MB just sitting around doing nothing while your development server is running.

Installing

npm install --global fast-run

Simplified Commands

Because Run is not concerned with other aspects of package management, it can interpret your command-line arguments with a lot of flexibility.

For instance, unlike Yarn, you don't have to add the workspace argument to run scripts in your workspace packages.

# Execute a script in the package root.
~/blog > yarn build

# Execute a script in a workspace package.
~/blog > yarn workspace node-server build

# Run, like Yarn, assumes you want a workspace root script unless you're in a subpackage folder.
~/blog > run build

# This is less typing…
~/blog > run node-server build

# And you can even type package substrings if the package names are awkward.
~/blog > run server build

# But you can still add "workspace" like Yarn to be explicit or to resolve ambiguity.
~/blog > run workspace serve build

# Or go into a package folder directly and run things there.
~/blog > cd packages/node-server
~/blog/packages/node-server > run build

Show Available Commands

Like Yarn, you can easily get a list of available scripts:

> run

Available commands in package blog:

  dev    tsc --watch
  build  run node-server build

Or, for a list of scripts in a particular package:

> run node-server

Available commands in package node-server:

  test   jest
  build  webpack