Skip to content
This repository has been archived by the owner on May 1, 2022. It is now read-only.
/ git-urls Public archive

Get file's online link with git remote URL

License

Notifications You must be signed in to change notification settings

qinezh/git-urls

Repository files navigation

npm AppVeyor

git-urls

Get online link of file with git remote URL(support Github, GitLab, Bitbucket, VSTS, DevOps)

Install

npm install git-urls

Usage example

import GitUrls from "git-urls";

const f = async () => {
    return await GitUrls.getUrlsAsync(__filename);
};

f().then(linkMap => {
    for (const [remoteName, link] of linkMap) {
        console.log(`${remoteName}: ${link}`);
    }
});