npm-prune

移除无关的包
概要

npm prune [[<@scope>/]…] [–production] [–dry-run] [–json]

详情

此命令移除“无关”的包。如果提供了包名,那么只有名称匹配的那个包才会被移除。

无关的包指的是没有在父包的依赖关系列表中列出的包。

如果指定了 --production 参数,或者将 NODE_ENV 环境变量 设置为 production,这个命令将移除 devDependencies 配置信息中列出的包。设置 --no-production 将会取消 NODE_ENV 为 production 的设置。

If the --dry-run flag is used then no changes will actually be made.

If the --json flag is used then the changes npm prune made (or would have made with --dry-run) are printed as a JSON object.

In normal operation with package-locks enabled, extraneous modules are pruned automatically when modules are installed and you’ll only need this command with the --production flag.

If you’ve disabled package-locks then extraneous modules will not be removed and it’s up to you to run npm prune from time-to-time to remove them.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值