justjavac / please-use-yarn

强制在项目中使用 yarn 作为包管理器

Home Page:https://www.npmjs.com/package/please-use-yarn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如果是 npm i xxx 是不是拦截不了

qinjialei24 opened this issue · comments

如题

是的:

Runs on local npm install without any arguments

preinstall 只会在没有参数的 npm installnpm ci 之前运行。

如果使用了 npm 安装,会导致 package.json 和 yarn.lock 不一致。可以在 ci 环境上使用 yarn --ignore-scripts --frozen-lockfile 来校验。

--frozen-lockfile     don't generate a lockfile and fail if an update is needed