DEV Community

Boots
Boots

Posted on

2

List Your Yarn Scripts Real Quick!!!

Do YOU write lots of yarn scripts?

Do YOU sometimes give them easy-to-forget names?

Have YOU ever wanted to list all your yarn scripts from the terminal?

Well, now you can!


Hi, my name is Boots, and I use yarn for no reason in particular.

I often write yarn scripts, because they are basically like poems of the frontend development world.

I write so many yarn scripts that I often forget their names.

Am I doomed to crack open my package.json just to look them up?

NO!

All I gotta do is type:

yarn run
Enter fullscreen mode Exit fullscreen mode

Because if you don't pass a script name to yarn run, it'll list all your scripts. Like this:

Example output from yarn run

Wow! So cool.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more