JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 258
  • Score
    100M100P100Q89066F
  • License MIT

Download repository from github

Package Exports

  • @slimio/github

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@slimio/github) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

github

Download repository from github

Getting Started

This package is available in the Node Package Repository and can be easily installed with npm or yarn.

$ npm i @slimio/github
# or
$ yarn add @slimio/github

Usage example

const download = require("@slimio/github");

async function main() {
    const projectZip = await download("SlimIO.is");
    console.log(projectZip);
}
main().catch(console.error);

API

download(repo: String, options?): Promise< String >

Download a given "public" repository ! Return the name of the .zip file (or the name of the extracted directory).

Repository should be formatted like that:

(org|username).repository_fullname

Available options:

name type default description
branch string master Git branch to download
dest string process.cwd() Zip/Directory destination
extract boolean false Extract .zip file

Roadmap

  • Implement download of private properties
  • Complete test coverage