# cache-github-repo

> Download files of the github repository at the local cache by managing commit tracing

Latest version **0.3.0** (published 2017-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install cache-github-repo
pnpm add cache-github-repo
yarn add cache-github-repo
bun add cache-github-repo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2017-08-10 |
| First published | 2017-08-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jimmy Moon |
| Maintainers | ragingwind |
| Keywords | cache, github, download, cache-github-repo |

## Links

- npm: https://www.npmjs.com/package/cache-github-repo
- Repository: https://github.com/ragingwind/cache-github-repo
- Homepage: https://github.com/ragingwind/cache-github-repo#readme
- Issues: https://github.com/ragingwind/cache-github-repo/issues
- npm.io page: https://npm.io/package/cache-github-repo

## Dependencies (5)

- [download](https://npm.io/package/download.md) ^6.2.5
- [fs-extra](https://npm.io/package/fs-extra.md) ^4.0.1
- [prettier](https://npm.io/package/prettier.md) ^1.5.3
- [node-fetch](https://npm.io/package/node-fetch.md) ^1.7.2
- [parent-module](https://npm.io/package/parent-module.md) ^0.1.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2017-08-10
- 0.2.0 — 2017-08-09
- 0.1.2 — 2017-08-09
- 0.1.1 — 2017-08-09
- 0.1.0 — 2017-08-09

## README

# cache-github-repo [![Build Status](https://travis-ci.org/ragingwind/cache-github-repo.svg?branch=master)](https://travis-ci.org/ragingwind/cache-github-repo)

> Download files of the github repository at the local cache by managing commit tracing


## Install

```
$ npm install cache-github-repo
```


## Usage

```js
const CacheGithubRepo = require('cache-github-repo');

const cache = new CacheGithubRepo()

if (await cache.updatable(repo, './node_modules/')) {
	await cache.cache('zeit/next.js', path.join('dest'))
}
```

## API

### CacheGithubRepo()

It returns the instance of cache manager

#### updatable

Check the repo can be updated, is out of dated

##### repo

Type: `string`

Repository names on github. ex) `ragingwind/cache-github-repo`

##### cachePath

Type: `string`

Path for saving of cache manifest file, named by `cache-github-repo.json`. Default is parent's `node_module/.cache`

#### cache

Cache the repo to local

##### repo

Type: `string`

Repository names on github. ex) `ragingwind/cache-github-repo`

##### dest

Type: `string`

unzipped files after downloading

## License

MIT © [Jimmy Moon](http://ragingwind.me)

---
_Source: https://npm.io/package/cache-github-repo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
