open-index/open-npm huggingface dataset:
npm package: @quarterto/package-version-github-release
Description: Create a release on Github using the version number from package.json
Author: Matt Brennan
Latest version: 1.2.0

# package-version-github-release

Create a release on Github using the version number from package.json

## usage

Create a Github access token with `repo` scope and put it in the env variable `GITHUB_RELEASE_TOKEN`, together with `GITHUB_RELEASE_USER` (the username for the token), `GITHUB_RELEASE_REPO` (the repository to create releases in) and `SOURCE_VERSION` (the commit hash to tag as the release; this is automatically set on Heroku). Run:

```sh
package-version-github-release
```

It's handy to run this with npm lifecycle scripts. You might consider postinstall, postpublish or heroku-postbuild.

## licence

MIT
npm package: @quarterto/package-version-jira-release
Description: Create a release on JIRA using the version number from package.json
Author: Matt Brennan
Latest version: 1.2.0

# package-version-jira-release

Create a release on JIRA using the version number from package.json

## usage

Create env variables `JIRA_HOST` (the hostname of your JIRA installation, which needs the REST API enabled), `JIRA_PROJECT` (the id of the project you want to create releases in, which should be a short alphabetic string), and `JIRA_USERNAME` & `JIRA_PASSWORD` (these should be for a user that has at least Project Admin permissions on the project). Run:

```sh
package-version-jira-release
```

If SOURCE_VERSION is set (i.e. it's running on Heroku), it'll be mentioned in the release description.

It's handy to run this with npm lifecycle scripts. You might consider postinstall, postpublish or heroku-postbuild.

## licence

MIT
npm package: @quarterto/package-version-sentry-release
Description: package-version-sentry-release ===
Author: Matt Brennan
Latest version: 1.5.0

package-version-sentry-release
===

Create a release on [Sentry](http://getsentry.com/) using the version number from `package.json`

usage
---

In Release Tracking in your Sentry project's settings, copy your webhook URL. Put it in the env variable `SENTRY_RELEASE_HOOK` and run:

```sh
package-version-sentry-release
```

If `SOURCE_VERSION` is set (i.e. it's running on Heroku), it'll be used as the Sentry commit `ref`.

It's handy to run this with npm lifecycle scripts. You might consider `postinstall`, `postpublish` or `heroku-postbuild`.

licence
---
MIT
npm package: @quarterto/stub-all
Description: simplifies creating a lot of (sinon) stubs in your (mocha) tests
Author: Matt Brennan
Latest version: 1.1.0

# stub-all

simplifies creating a lot of (sinon) stubs in your (mocha) tests

## installation

```sh
npm install @quarterto/stub-all
```

## usage

```js
const stubAll = require('@quarterto/stub-all');
const sinon = require('sinon');

describe('foo', () => {
  stubAll(() => [
    sinon.stub(foo, 'bar'),
    sinon.stub(foo, 'baz'),
    sinon.stub(foo, 'quux'),
  ])
});
```

Pass a function returning an array of stubs to `stubAll`. It calls the function in `before`, creating your stubs, `reset`s them all in `beforeEach` (making sure things like `wasCalled` are clean in each test, and `restore`s them all in `after`.

## licence

ISC
npm package: @quarterto/twine
Description: Untangle and wrap together your async
Author: Matt Brennan
Latest version: 0.0.1

![twine](https://f.cloud.github.com/assets/631757/278712/d4d4c6ca-90f0-11e2-83cf-95abf955b9c0.png)
Async code gets tangled. ```npm install twine```.


```livescript
{asyncfn,sync,future}:Twine = require \twine

class Example extends Twine
	getdata: asyncfn ->
		# sync code to get some data

	makefolder: asyncfn ->
		# sync code to create a directory to store a file in
		# this is run at the same time as getting the data

	writefile: @depends \getdata \makefolder asyncfn ({getdata: data, makefolder: folder})->
		# once there is some data and the directory exists,
		# write the data to a file in the directory
		return filename

	emaillink: @depends \writefile asyncfn (results)->
		# once the file is written let's email a link to it...
		# results.writefile contains the filename returned by writefile.

ex = new Example
ex.emaillink (err,results)->console.error that if err?
```

Twine ties in [async.js](http://github.com/caolan/async#auto)'s ```async.auto``` and [node-sync](http://github.com/0ctave/node-sync) so you can write clean, uncluttered, modular async code.

## The guts
### Twine subclasses
Any method in a subclass of ```Twine``` can be dependency, so long as it's either an ```asyncfn``` or takes a Node-style ```(err,result)->``` callback. Methods declare their dependencies using ```Twine.depends```. When you call a method with dependencies, Twine unwraps them and hands over to ```async.auto```, which does some clever stuff to work out when to call the things.

### ```asyncfn```
Anywhere within an ```asyncfn``` asynchronous functions can be called synchronously using ```sync```:

```livescript
asyncfn ->
	try
		contents = (sync fs.read-file) "awesome.txt" \utf8
	catch err
```
Errors what would have got passed to the first argument of the callback get thrown.

## Licence
[MIT](licence.md).
&copy;2013 Matt Brennan.