Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iyowei/get-git-repo-url
异步获取指定 Git 项目远程仓库地址。
https://github.com/iyowei/get-git-repo-url
git iyowei nodejs utilities
Last synced: 27 days ago
JSON representation
异步获取指定 Git 项目远程仓库地址。
- Host: GitHub
- URL: https://github.com/iyowei/get-git-repo-url
- Owner: iyowei
- License: mit
- Created: 2021-12-13T10:34:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-18T07:38:24.000Z (almost 3 years ago)
- Last Synced: 2024-09-29T14:41:51.971Z (about 1 month ago)
- Topics: git, iyowei, nodejs, utilities
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[@iyowei/get-git-repo-url-sync]: #
[@iyowei/p-get-git-repo-url]: ## getGitRepoUrl(path, callback)
> **异步** 获取指定 Git 项目远程仓库地址。
## 使用
- path {String} 工作路径,**默认:** `""`;
- callback {Function},
- err {Error} 错误信息,没发生错误,则返回 `false`;
- url {String | Null} 远程 Git 仓库地址。```javascript
import getGitRepoUrl from '@iyowei/get-git-repo-url';getGitRepoUrl(process.cwd(), (err, url) => {
if (!err) {
console.log(url);
return;
}throw err;
});
```## 安装
[![Node version](https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js)](https://nodejs.org/en/download/)
```shell
# Pnpm
pnpm add @iyowei/get-git-repo-url# yarn
yarn add @iyowei/get-git-repo-url# npm
npm add @iyowei/get-git-repo-url
```## 相关
- [@iyowei/get-git-repo-url-sync][@iyowei/get-git-repo-url-sync], 串行实现;
- [@iyowei/p-get-git-repo-url][@iyowei/p-get-git-repo-url],并行接口,Promise 版。## 参与贡献
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)