npm audit 仅适用于生产依赖项?
Posted
技术标签:
【中文标题】npm audit 仅适用于生产依赖项?【英文标题】:npm audit only for production dependencies? 【发布时间】:2018-10-25 10:07:05 【问题描述】:目前,在项目中运行npm audit
时,它会同时检查dependencies
和devDependencies
。我正在寻找一种只检查dependencies
的方法。目前有办法吗?
【问题讨论】:
我暂时找不到任何东西,但显然,有一个关于它的 PR 提交 - github.com/npm/npm/pull/20594 太棒了,所以这只是时间问题。谢谢! 【参考方案1】:在 npm 6.10.0 中发布了对 --production
标志的支持
https://github.com/npm/cli/pull/202
npm audit --production
【讨论】:
以上是关于npm audit 仅适用于生产依赖项?的主要内容,如果未能解决你的问题,请参考以下文章