update package.json version automatically

后端 未结 12 2064
长发绾君心
长发绾君心 2020-12-02 04:37

Before I do a small release and tag it, I\'d like to update the package.json to reflect the new version of the program.

Is there a way to edit the file package

12条回答
  •  既然无缘
    2020-12-02 04:52

    With Husky:

    {
      "name": "demo-project",
      "version": "0.0.3",
      "husky": {
        "hooks": {
          "pre-commit": "npm --no-git-tag-version version patch"
        }
      }
    }
    

提交回复
热议问题