爱意满满的作品展示区。
Septembers

在 npm 安装 时 自动初始化 git-flow

  •  
  •   Septembers · Feb 18, 2020 · 2087 views
    This topic created in 2288 days ago, the information mentioned may be changed or developed.

    本工具功能很简单

    即在 npm install 时通过 npm postinstall 这个 hook

    完成自动配置 git config 完成 git-flow 的初始化

    在团队协作时,可以避免 git-flow 的初始化配置不一致导致的各种问题

    https://github.com/NiceLabs/git-flow-init


    另一款工具是无外部依赖且实现干净的 git 信息获取

    例如 commit hash, commit date, latest message 等信息

    import git from "@nice-labs/git-rev";
    // short commit-hash
    console.log(git.commitHash(true)); // 75bf4ee
    // long commit-hash
    console.log(git.commitHash()); // 75bf4eea9aa1a7fd6505d0d0aa43105feafa92ef
    // branch name
    console.log(git.branchName()); // master
    

    https://github.com/NiceLabs/git-rev

    1 replies    2020-02-18 16:16:43 +08:00
    isukkaw
        1
    isukkaw  
       Feb 18, 2020   ❤️ 1
    好耶!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3233 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 13:10 · PVG 21:10 · LAX 06:10 · JFK 09:10
    ♥ Do have faith in what you're doing.