Have ideas to improve npm?Join in the discussion! »

    sails-generate-githooks

    0.1.5 • Public • Published

    sails-generate-githooks

    A githooks generator for use with the Sails command-line interface.

    Certain generators are installed by default in Sails, but they can be overridden. Other generators create entirely new things. Check the Sails docs for information on installing generator overrides / custom generators and information on building your own generators.

    Installation

    $ npm install sails-generate-githooks

    Usage

    On the command line
    $ sails generate githooks 
    Start deployment
    $ forever start githooks.js

    Configure

    file: config/githooks.conf.js
    // GITHooks config file
    var post = require('../hooks/post.hook'),
    marge = require('../hooks/marge.hook');
     
    module.exports = {
        appPath: "~/apps/hooks",
        user: [],
        hooks: {
            "post": post,
            "marge": marge
        },
        port: 8080
    }
    Hook example on post back
        module.exports = function (hookParams, hook) {
        // Post hook filter
        hook.do('git', ['pull'], function(){
            hook.do('forever', ['restartall'], function(){
                console.log("POST hook done.");
                //...
            });
        });
    }

    Development

    To get started quickly and see this generator in action, ...

    Also see CONTRIBUTING.md for more information on overriding/enhancing existing generators.

    Questions?

    See FAQ.md.

    More Resources

    License

    MIT © 2014 balderdashy & contributors

    As for Sails? It's free and open-source under the MIT License.

    image_squidhome@2x.png

    Install

    npm i sails-generate-githooks

    DownloadsWeekly Downloads

    24

    Version

    0.1.5

    License

    MIT

    Last publish

    Collaborators

    • avatar