如何编译后自动提交代码

191 阅读1分钟

利用pkg这个特殊的命名

    "pkg": "npm run build",
    "prepkg": "git pull",
    "postpkg": "git add -A && git commit -m auto-pkg -n && git push"

执行 npm run pkg 即可