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":
> time npm run hello
hello world
⌠0.17s
> time yarn run hello
hello world
⌠0.63s
> 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.
~/blog > yarn build
~/blog > yarn workspace node-server build
~/blog > run build
~/blog > run node-server build
~/blog > run server build
~/blog > run workspace serve build
~/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