[Feature] Add `--mode=skip-build` to `yarn workspaces focus --production`
See original GitHub issue- I’d be willing to implement this feature (contributing guide)
- This feature is important to have in this repository; a contrib plugin wouldn’t do
Describe the user story
I have Docker image with my Node.js app. For performance and security reasons, I need:
- Install only
dependencies, notdevDependnecies. - Do not run scripts like
install
I found that I can use yarn workspaces focus --production to install production dependencies, but yarn workspaces focus have no support for --mode=skip-build.
Describe the solution you’d like
yarn workspaces focus --production --mode=skip-build
Describe the drawbacks of your solution
Do not see from my area of expertise.
Describe alternatives you’ve considered
My current solution is:
RUN yarn plugin import workspace-tools
RUN yarn install --mode=skip-build --immutable
RUN yarn workspaces focus --production
But it is slow.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
`yarn workspaces focus` | Yarn - Package Manager
Details. This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones...
Read more >[Feature] "yarn workspaces focus" option --prune-cache #1789
The documentation for yarn berry says to use the yarn workspaces focus --production command as a replacement for yarn install --production .
Read more >When Using Yarn Workspaces How To Install Every ... - ADocLib
yarn workspaces focus.Plugin.To use this command first install the workspacetools plugin: yarn plugin import workspacetools.
Read more >`yarn workspaces focus` - JavaScript 软件包管理器 - Yarn 中文网
Install a single workspace and its dependencies. ... yarn workspaces focus ... Combine with --production to replicate the old yarn install --production ....
Read more >Yarn install production dependencies of a single package in ...
The --focus flag is broken https://github.com/yarnpkg/yarn/issues/6715 # Avoid the target workspace dependencies to land in the root ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Oh 😰 Can we add
skip-buildtoyarn workspaces focus?@ai Hello, I know that yarn has a config option
enableScriptswhich disablespostinstallscript. And yarn is different with npm, yarn doesn’t execute scripts exceptpostinstallinside the install step.