1.0.1 • Published 2 years ago

@iyowei/get-git-repo-url v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

getGitRepoUrl(path, callback)

异步 获取指定 Git 项目远程仓库地址。

使用

  • path {String} 工作路径,默认: ""
  • callback {Function},
    • err {Error} 错误信息,没发生错误,则返回 false
    • url {String | Null} 远程 Git 仓库地址。
import getGitRepoUrl from '@iyowei/get-git-repo-url';

getGitRepoUrl(process.cwd(), (err, url) => {
  if (!err) {
    console.log(url);
    return;
  }

  throw err;
});

安装

Node version

# Pnpm
pnpm add @iyowei/get-git-repo-url

# yarn
yarn add @iyowei/get-git-repo-url

# npm
npm add @iyowei/get-git-repo-url

相关

参与贡献

PRs Welcome