{"bin":{"hooks":"./bin/hooks.js"},"bugs":{"url":"https://github.com/mcwhittemore/node-hooks/issues"},"dist":{"shasum":"d6e438fd74e95478a40d869d75f2141817a54934","tarball":"https://registry.npmjs.org/node-hooks/-/node-hooks-0.0.15.tgz","integrity":"sha512-f9e7nlUNb1S96nDbeV5arsEl25g8PuEDmkMywYJhkiPXHLc9Ri3+yAn2pvCJ9uP0hAAkwqcold8Plb62fnjAGg==","signatures":[{"sig":"MEUCIATahr+FrSvKghruQS10dhP1Ua0W0T+hXpEHq8KFTmgrAiEAu9ZX+XscSDLrQ1L5UONlQpYfgAqeRHpjlnNcEgKP79Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./bin/hooks.js","name":"node-hooks","_from":".","author":{"name":"Matthew Chase Whittemore","email":"mcwhittemore@gmail.com"},"readme":"# Hooks\n\nAn [NPM](https://github.com/isaacs/npm) for git hooks.\n\n![nook-hooks download history](https://nodei.co/npm-dl/node-hooks.png)\n\n## Terms\n\n* `hook-module`: Any module in npm that meets the `hook-module specification`. \n* `hook-module specification`: A set of guidelines that define what it means to be a `hook-module`. [View here.](https://github.com/mcwhittemore/node-hooks/blob/master/docs/hook-module-specification.md)\n* `npm`: node package manager. This can be (and is) used for more things than node modules.\n* `npm-module`: a bit of code that can be downloaded via npm.\n* `package.json`: a required file for `npm-modules` defined [here](https://github.com/isaacs/npm/blob/master/doc/files/package.json.md).\n\n## Setup\n\n```\nnpm install -g node-hooks\n```\n\n## Use\n\n**When setting up a new project**\n\n```\ngit init\nhooks init\nhooks install new-hook\n```\n\n**Else**\n\n```\nhooks install\n```\n\n## View Available Hooks on NPM\n\n`hooks list`\n\n## How to write a git hooks for `Hooks`\n\nCheck out this README for a quick intro. For more depth checkout the [hook-module sepcs](https://github.com/mcwhittemore/node-hooks/blob/master/docs/hook-module-specification.md) which covers the hook module requirements.\n\nThere is also a [hook-module best practices](https://github.com/mcwhittemore/node-hooks/blob/master/docs/hook-module-best-practices.md) doc which should help you avoid trip ups.\n\n## Is there a way to search npm for hook-modules only?\n\nWorking on that. See the TODO list below.\n\n## Commands\n\n### hooks init\n\nInits hooks into the current working directory, seeding the required hooks.json and package.json files if needed. \n\nIt will also add node-hooks to the projects project.json devDependencies and node_modules folder so that all developers on the project will use the same hooks even if they don't have node-hooks installed locally.\n\n#### Options\n\n* --soft: stops install from adding hooks to the package.json devDependencies and node_modules.\n* --bare: updates folder dependency checks to reflect that of a git --bare repo.\n\n### hooks install\n\nInstalls all hook-modules from hooks.json into the current working directory.\n\n### hooks install {hook-module} [options]\n\nAdds an npm module to the local hooks project if the `hook module's` package.json fits the `hook-module specification` below. By default the module will be added to the hook specified in the module's package.json \"default-hook\" parameter and to the project's package.json devDependencies parameter.\n\n#### Options\n\n* --hook {GIT HOOK NAME}: this option overrides the hook-module's default-hook parameter.\n* -f, --force: installs a module from npm even if it doesn't meet the `hooks-module specification`. Requires the --hook option\n* --soft: don't add the module to the package.json\n\n### hooks add {hook-module} [options]\n\nSee `hooks install {hook-module} [options]`\n\n### hooks uninstall\n\nUninstall hooks from the current working directory. Removes hooks.json, but does not touch package.json or the node_module directory.\n\n### hooks remove {hook-module} [options]\n\nRemoves a `hook-module` from the default hooks.\n\n#### Options\n\n* --hook {GIT HOOK NAME}: remove module from specified git hook.\n* --all-hooks: remove the module from all git hooks\n* --hard: Also removes the module from the project's devDependencies parameter.\n\n### hooks list\n\nLists the hook modules registered with node-hooks.\n\n### hooks search key words\n\ndoes an npm search for modules tagged git-hooks\n\n### hooks run {git-hook}\n\nRuns a hook.\n\n## To Do\n\n1. Rework globals\n\t* ~/.hooks/global: hooks a user wants to run for all their projects\n1. Add `hooks skip hook-module` to skip globals\n\n## Upcoming Commands\n\n* hooks install --global: Add a hook module to the global scope.\n* hooks remove --global: Remove a hook module from the global scope.\n* hooks run --global: Run a hook module that is in the global scope.\n* hooks list --global: Lists the hook modules in your global scope.\n* hooks list --local: Lists the hook modules as they are setup in the current project.\n* hooks list --hook {git-hook}: limits results to hook modules for the specified git hook.\n\n### hooks skip {hook-module} [options]\n\nRemove a modules from the project (hooks remove --all-hooks) and forces a skip if its installed on a global level\n\n#### Options\n\n* --hook {GIT HOOK NAME}: remove module from specified git hook.\n* --all-hooks: remove the module from all git hooks\n\n## Change Log\n\n### 0.0.15\n\n* Moved the setup parts of install to init.\n* Mapped add to install in the api router.\n* Forced install to route to add if args are provided.\n* Reordered changelog to make it more readable as it grows\n* Changed exec in init to use npm-installer\n* Fixed bug in hooks-runner to make spawn not fail when installed in the .git/hooks folder of node-hooks\n\n### 0.0.14\n\n* Finshed commenting out the main files\n* Reworked hook-module-validator to have a clearer workflow\n* Moved hook-runner.sh to hook-runner.js so to be clearer to fellow contribtures\n\n### 0.0.13\n\n* Cleaned up code a bit and started commenting command files.\n* Added console.log with a google signup form to the install process.\n* Updated help command to ask people to help me and direct them to the docs.\n\n### 0.0.12\n\n* Hooks-module installation is now handled by npm-installer rather than a child_process.exec\n\n### 0.0.11\n\n* Moving all child_process not related to npm away from child_process.exec to child_process.spawn and directing child_process stdout to console.\n\n### 0.0.10\n\n* Bug fix concerning multiple hook-modules running from the same hook\n\n### 0.0.8\n\n* Bug fix concerning adding npm data to the hooks.json file\n\n### 0.0.7\n\n* Update to shell script to avoid failure if package.json is not found.\n* Update to run, not exiting if hooks.json can't be found.\n\n### 0.0.5\n\n* Pass args on to hook-moduless\n* Provide --bare command for install hooks into bare repos\n* Started move towards using spawn rather than exec from child_process.\n\n### 0.0.4\n\n* Adding availabe hooks section to readme\n* Starting change log\n\n\n","license":"MIT","scripts":{"test":"mocha","postinstall":"node ./bin/hooks install","preuninstall":"node ./bin/hooks uninstall"},"_npmUser":{"name":"mcwhittemore","email":"mcwhittemore@gmail.com"},"keywords":["git","hooks"],"repository":{"url":"git://github.com/mcwhittemore/node-hooks.git","type":"git"},"_npmVersion":"1.3.8","description":"An NPM for git hooks.","directories":{"test":"test"},"maintainers":[{"name":"mcwhittemore","email":"mcwhittemore@gmail.com"}],"dependencies":{"colors":"~0.6.1","request":"~2.27.0","npm-installer":"0.0.0"},"readmeFilename":"readme.md","devDependencies":{"mocha":"~1.12.0","should":"1.2.2","esprima.hks":"0.0.0","beautify.hks":"0.0.1"},"_id":"node-hooks@0.0.15","version":"0.0.15"}