# contre

> Continuously release git repos into github-style directories

Latest version **0.2.3** (published 2013-03-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install contre
pnpm add contre
yarn add contre
bun add contre
```

Provides the command `contre`.

## 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.2.3 |
| Published | 2013-03-13 |
| First published | 2012-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Julian Gruber |
| Maintainers | juliangruber |
| Keywords | git, github, filesystem, release |

## Links

- npm: https://www.npmjs.com/package/contre
- Repository: https://github.com/godmodelabs/contre
- npm.io page: https://npm.io/package/contre

## Dependencies (3)

- [seq](https://npm.io/package/seq.md) ~0.3.5
- [remove](https://npm.io/package/remove.md) ~0.1.5
- [pushover](https://npm.io/package/pushover.md) ~1.1.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.2.3 (latest) — 2013-03-13
- 0.2.2 — 2012-10-18
- 0.2.1 — 2012-10-18
- 0.2.0 — 2012-10-18
- 0.1.2 — 2012-10-15
- 0.1.1 — 2012-10-13
- 0.1.0 — 2012-10-13

## README

# contre

Continuously release from git repos into a github-style directory structure.

_Due to a current limitation of juliangruber/pushover tags have to be pushed
seperately_

## Usage

```javascript
var Contre = require('contre');
var http = require('http');

var contre = Contre({
  from : __dirname + '/repos',
  to : __dirname + '/static'
});

http.createServer(contre.handle()).listen(3000);
```
Or in an empty directory:

```bash
$ contre 3000
contre listening on port 3000
```

Now push some repo with a file `foo.txt` to `contre`:

```bash
$ git push http://localhost:3000/test.git master
$ git push --tags http://localhost:3000/test.git
...
$ ls repos
test.git
$ tree static
static/
└── test
    ├── master
    │   └── foo.txt
    └── 0.0.1
        └── foo.txt
```

Tadaa!

## Installation

```bash
$ npm install contre
$ npm install -g contre
```

## API

### Contre(opts)

Required `opts`:

* `from`: Directory that contains all repos
* `to`: Directory in which the repos will be laid out in a github-style
directory structure

Returns an EventEmitter that emits a `release`-event whenever it is pushed to.

### Contre#handle()

Returns a new request handler to be passed to `http.createServer()` that does
all the stuff.

### Contre#release(push|tag)

Used internally by `Contre#handle()`. Use this if you need to do more on each
push/tag. See `examples/custom`.

`push`/`tag` must come directly from [pushover](https://github.com/substack/pushover)

## License

(MIT)

Copyright (c) 2012 &lt;julian@juliangruber.com&gt;

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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