如何使用 devinstall 和 devuninstall 脚本?

How are devinstall and devuninstall scripts being used?

我正在尝试将 husky 重用于其他项目(不仅仅是配置文件),构建一个将被所有其他项目使用的各种库。 我无法理解如何以及何时执行 devistall 和 devuninstall 脚本。在 npmjs.com 上也找不到任何文档。 有人可以帮助了解何时执行此操作吗?

我也一直在努力理解这一点。 结果他们在发布时做了一些事情,将 _install 脚本重命名为 install.

这是通过 npm 安装时在 husky 文件夹中找到的 package.json 的脚本字段。

"scripts": {
    "build": "del-cli lib && tsc",
    "devinstall": "npm run build && npm run _install -- node_modules/husky && node scripts/dev-fix-path",
    "devuninstall": "npm run build && npm run preuninstall -- node_modules/husky",
    "fix": "npm run lint -- --fix",
    "install": "node husky install",
    "lint": "tslint 'src/**/*.ts'",
    "postpublish": "pinst --disable",
    "postversion": "git push && git push --tags",
    "prepublishOnly": "npm run test && npm run build && pinst --enable && pkg-ok",
    "preuninstall": "node husky uninstall",
    "test": "npm run lint && jest",
    "version": "jest -u && git add -A src/installer/__tests__/__snapshots__"
  }

虽然我不知道那是在哪里完成的