yarnpkg/yarn

Allow install only devDependencies

Open

#3,254 创建于 2017年4月25日

在 GitHub 查看
 (45 评论) (124 反应) (0 负责人)JavaScript (41,514 star) (2,731 fork)batch import
cat-featurehelp wantedneeds-discussiontriaged

描述

Do you want to request a feature or report a bug? Hopefully this is a small feature request. I'd like a flag that allows me to only install devDependencies. This would allow me to split my flat installed client code from my build tools code.

Thanks to the fix in https://github.com/yarnpkg/yarn/issues/2781#issuecomment-296955569 I can now do:

yarn install --flat --production --modules-folder client_modules

And only install dependencies in my client_modules directory. This is awesome ❤️

If I also do yarn, it will install dependencies and devDependencies into my node_modules directory. But I already flat installed my dependencies into client_modules so installing them again in node_modules isn't necessary.

What is the current behavior? There's no way to only install devDependenices.

What is the expected behavior? A flag, maybe yarn install --dev-dependencies or something like that?

贡献者指南