grunt-watch-github
Watch github push hooker
Getting Started
This plugin requires Grunt ~0.4.4
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-watch-github --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "watch_github" task
Before use
You should go to GitHub site and set hook service first. You can find setting on following url:
http://github.com/{your account}/{your project}/settings/hooks/
Create a new webhook and use json version payload. Remember the url port if your hooker listening port is not on 80.
Overview
In your project's Gruntfile, add a section named watch_github
to the data object passed into grunt.initConfig()
.
grunt;
Options
options.bind_address
Type: String
A string value that is your server external ip.
options.bind_port
Type: Number
Default value: 9090
A number value that is hook server port.
Example
If use the yeoman generator, you can just work with build task loop like this:
grunt;
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
v0.1.0 first version for simple hooker.