Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何yarn test通过 Husky 在 Docker 内部运行 git-hook 命令(如 )?
yarn test
弄清楚了。这进入package.json:
package.json
"husky": { "hooks": { "pre-commit": "docker run --rm -v \"$PWD\":/usr/src/app -w /usr/src/app node:alpine yarn test", "pre-push": "docker run --rm -v \"$PWD\":/usr/src/app -w /usr/src/app node:alpine yarn test" } }