berry icon indicating copy to clipboard operation
berry copied to clipboard

[Feature] Shorthands for yarn workspace(s) CLI commands

Open JosXa opened this issue 2 years ago • 3 comments

  • [ ] I'd be willing to implement this feature (contributing guide)
  • [x] This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

As a dev, I'm really tired of typing out "yarn workspace @mylib/mypackage run xyz" in my monorepo so often, and am looking for a way to reduce the effort. It also makes the NPM scripts longer than they could otherwise be.

Describe the solution you'd like

Introduce shortcuts:

yarn workspace ... == yarn ws ... yarn workspaces ... == yarn wss ...

Describe the drawbacks of your solution

We might introduce some ambiguity in docs and on sites like stackoverflow where it isn't clear what the shortcuts stand for.

JosXa avatar Aug 22 '23 21:08 JosXa

I just google-d yarn workspace shorthand and sadly find this

kopax avatar Jul 20 '24 13:07 kopax

You can just make your life easier by adding these in package.json

  "scripts": {
    "ws": "yarn workspace",
    "wss": "yarn workspaces"
  },

Then run yarn ws

ShanArosh avatar Oct 17 '24 12:10 ShanArosh

Great idea @ShanArosh

JosXa avatar Oct 17 '24 15:10 JosXa