# grunt-pusher

> Pusher task for Grunt

Latest version **0.1.0** (published 2014-11-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-pusher
pnpm add grunt-pusher
yarn add grunt-pusher
bun add grunt-pusher
```

## 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.1.0 |
| Published | 2014-11-27 |
| First published | 2014-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | rjelierse |
| Keywords | pusher, grunt |

## Links

- npm: https://www.npmjs.com/package/grunt-pusher
- Repository: https://github.com/shareworks/grunt-pusher
- Issues: https://github.com/shareworks/grunt-pusher/issues
- npm.io page: https://npm.io/package/grunt-pusher

## Dependencies (3)

- [colors](https://npm.io/package/colors.md) ~1.0.3
- [lodash](https://npm.io/package/lodash.md) ~2.4.1
- [pusher](https://npm.io/package/pusher.md) ~1.0.2

## Recent versions

- 0.1.0 (latest) — 2014-11-27

## README

# grunt-pusher

> Send events through [Pusher](http://pusher.com)

## Getting Started
_If you haven't used [grunt][] before, be sure to check out the [Getting Started][] guide._

From the same directory as your project's [Gruntfile][Getting Started] and [package.json][], install this plugin with the following command:

```bash
npm install grunt-pusher --save-dev
```

Once that's done, add this line to your project's Gruntfile:

```js
grunt.loadNpmTasks('grunt-pusher');
```

If the plugin has been installed correctly, running `grunt --help` at the command line should list the newly-installed plugin's task or tasks. In addition, the plugin should be listed in package.json as a `devDependency`, which ensures that it will be installed whenever the `npm install` command is run.

[grunt]: http://gruntjs.com/
[Getting Started]: https://github.com/gruntjs/grunt/blob/devel/docs/getting_started.md
[package.json]: https://npmjs.org/doc/json.html

## The "pusher" task

### Overview
In your project's Gruntfile, add a section named `pusher` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  pusher: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific options go here.
    },
  },
})
```

### Options

#### options.appId
Type: `String`

Your Pusher application id 

#### options.secret
Type: `String`

Your Pusher application secret

#### options.key
Type: `String`

Your Pusher application key

#### options.channel
Type: `String|Array`

The channel (or channels) to send the event to

#### options.event
Type: `String`

The event name

#### options.payload
Type: `Object`
Default value: `{}`

The payload to send with the event

### Usage Examples

#### Default Options
In this example, the `bar` event is sent through the `foo` channel with an empty payload.

```js
pusher: {
  options: {
    appId: "my-pusher-app-id",
    secret: "my-pusher-app-secret",
    key: "my-pusher-app-key"
  },
  main: {
    options: {
      channel: "foo",
      event: "bar"
    }
  }
}
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt][].

## Release History
 * 2014-11-27   v0.1.0   Initial release.

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