我的.husky放在父目录中。在子程序中,我有nx workspace代码。在这种情况下,如何添加引用链接来检查父目录中的脚本?
parent/
├─ nx-workspace/
│ ├─ package.json
│ ├─ apps
│ ├─ libs
.git
.husky在这里,package.json脚本应该阅读git和husky的细节。
发布于 2022-07-18 07:03:22
在pre-commit钩子中,我们可以通过以下方式获得.git目录的绝对路径
git rev-parse --absolute-git-dir如果我们知道文件夹结构,那么很容易获得到其他目录的路径。
https://stackoverflow.com/questions/73018098
复制相似问题