zoukankan      html  css  js  c++  java
  • 简化gitHub发布到npm 和同时提交到GitHub上

    "scripts": {
        "_____comment": "npm run git -- 'commit-msg'  so you can push and update by a auto way",
        "git": "npm run build && git add . && git commit -m",
        "postgit": "npm version patch && npm publish && git push --all",
      },



    解析

    comment是JSON里的注释,告诉别人怎么使用,所以这个命令就是

    npm run git -- 'feat: xxxx'

    把后面的参数传递给NPM里的git script,完成commit操作。

    在postgit自动钩子里,做版本升级,然后进行publish和push操作。

    npm version patch可以用来升级最小版本号,当然也有升级次版本号的

    npm version minor

    和主版本号的

    npm version major
  • 相关阅读:
    Stupid Tower Defense
    Lifting the Stone
    城市地平线
    BestCoder Sequence
    Miaomiao's Geometry
    Rating
    Turn the pokers
    Peter's Hobby
    HTTP关键词收集
    HTTP出现前的协议
  • 原文地址:https://www.cnblogs.com/wuxu-dl/p/15044905.html
Copyright © 2011-2022 走看看