berry
berry copied to clipboard
[Feature] Shorthands for yarn workspace(s) CLI commands
- [ ] 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.
I just google-d yarn workspace shorthand and sadly find this
You can just make your life easier by adding these in package.json
"scripts": {
"ws": "yarn workspace",
"wss": "yarn workspaces"
},
Then run yarn ws
Great idea @ShanArosh