1.0.2 • Published 1 year ago

mnm-github-repo-downloader v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

GitHub Clone Repo

Simple library to download github repo without git.

Install

$ npm install mnm-github-repo-downloader

Example

demo.mjs

import cloneRepo from "mnm-github-repo-downloader";

(async function(){
    let repositoryCloned = await cloneRepo({
        owner: "sample-name",
        repository: "sample-app",
        branch: "master",
        outPath: "./output",
        headerOptions : {
            Authorization : `Bearer {github-token}`
        }
    });

    console.log(success ? "Success!" : "Failed :(");
}());

CommonJS

demo.cjs

const cloneRepo = require("mnm-github-repo-downloader");

(async function(){
    let repositoryCloned = await cloneRepo({
        owner: "sample-name",
        repository: "sample-app",
        branch: "master",
        outPath: "./output",
        headerOptions : {
            Authorization : `Bearer {github-token}`
        }
    });

    console.log(success ? "Success!" : "Failed :(");
}())