{"id":19286735,"url":"https://github.com/marcellodesales/git-guppy-pre-commit-hook","last_synced_at":"2025-04-22T03:33:34.471Z","repository":{"id":23369515,"uuid":"26730807","full_name":"marcellodesales/git-guppy-pre-commit-hook","owner":"marcellodesales","description":"The git-guppy pre-commit hook plugin","archived":false,"fork":false,"pushed_at":"2015-05-18T18:01:07.000Z","size":193,"stargazers_count":5,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T06:02:53.330Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcellodesales.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-16T22:42:50.000Z","updated_at":"2016-07-14T12:17:24.000Z","dependencies_parsed_at":"2022-08-05T22:16:07.265Z","dependency_job_id":null,"html_url":"https://github.com/marcellodesales/git-guppy-pre-commit-hook","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcellodesales%2Fgit-guppy-pre-commit-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcellodesales%2Fgit-guppy-pre-commit-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcellodesales%2Fgit-guppy-pre-commit-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcellodesales%2Fgit-guppy-pre-commit-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcellodesales","download_url":"https://codeload.github.com/marcellodesales/git-guppy-pre-commit-hook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249838224,"owners_count":21332562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:03:53.204Z","updated_at":"2025-04-22T03:33:34.190Z","avatar_url":"https://github.com/marcellodesales.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-guppy-pre-commit-hook \n[![NPM version](https://badge.fury.io/js/git-guppy-pre-commit-hook.png)](http://badge.fury.io/js/git-guppy-pre-commit-hook) [![Dependency Status](https://david-dm.org/marcellodesales/git-guppy-pre-commit-hook.svg)](https://david-dm.org/marcellodesales/git-guppy-pre-commit-hook)\n\n\u003e Git pre-commit hook for Git Guppy, a Simple git-hook integration for your gulp workflows.\n\nGo to https://github.com/therealklanni/git-guppy to install \"git-guppy\", which is the core module!\n\n## Git Documentation\n\nDetails about this hook at http://git-scm.com/docs/githooks#_pre_commit\n\n## Install\n\nInstall with [npm](npmjs.org):\n\n```\n$ npm install --save git-guppy-pre-commit-hook\nnpm http GET https://registry.npmjs.org/named-regexp\nnpm http 304 https://registry.npmjs.org/named-regexp\nnpm http GET https://registry.npmjs.org/lazypipe\nnpm http GET https://registry.npmjs.org/lodash\nnpm http GET https://registry.npmjs.org/shelljs\nnpm http 304 https://registry.npmjs.org/lodash\nnpm http 304 https://registry.npmjs.org/shelljs\nnpm http 304 https://registry.npmjs.org/lazypipe\nnpm http GET https://registry.npmjs.org/stream-combiner\nnpm http 304 https://registry.npmjs.org/stream-combiner\nnpm http GET https://registry.npmjs.org/duplexer\nnpm http GET https://registry.npmjs.org/through\nnpm http 304 https://registry.npmjs.org/duplexer\nnpm http 304 https://registry.npmjs.org/through\n\n\u003e git-guppy@0.2.1 postinstall /tmp/sp-quality/node_modules/git-guppy-pre-commit-hook/node_modules/git-guppy\n\u003e scripts/install.js\n\n/tmp/sp-quality\nThanks for installing git-guppy! Install any of the hooks available now!\nnpm install --save git-guppy-pre-commit git-guppy-pre-commit git-guppy-post-commit ...\nGo to https://github.com/therealklanni/git-guppy for a complete list!\n\n\u003e git-guppy-pre-commit-hook@0.1.0 postinstall /tmp/sp-quality/node_modules/git-guppy-pre-commit-hook\n\u003e ../git-guppy/scripts/install.js pre-commit\n\n/tmp/sp-quality\npre-commit installed successfully\ngit-guppy-pre-commit-hook@0.1.0 node_modules/git-guppy-pre-commit-hook\n├── named-regexp@0.1.1\n└── git-guppy@0.2.1 (shelljs@0.3.0, lodash@2.4.1, lazypipe@0.2.2)\n```\n\nAfter the installation is complete, the hook is installed at `APP/.git/hook/pre-commit`.\n\n## Usage\n\nFollow the example below to get up and running!\n\n### Git and Gulp integration\n\nUsually, pre-commit hooks can be used to trigger lint, code check, among other things. The following example\ncreates a task called \"check\", which uses lint and jscs to verify the code prior to a commit. If the verification\nfails, the commit process halts as expected. If it passes, profit! and commit!\n\n```\n  var gulp = require(\"gulp\");\n\n  gulp.task(\"check\", function() {\n    // Check all the source and the test cases together\n    return gulp.src(appSourcePaths.concat(testSourcePaths))\n      .pipe(jshint(SP_QUALITY_MODULE_CONFIG_DIR + \"/.jshintrc\"))\n      .pipe(jshint.reporter(stylish))\n      .pipe(jscs(SP_QUALITY_MODULE_CONFIG_DIR + \"/.jscsrc\"))\n      .on(\"error\", function() {\n        process.exit(-1);\n      })\n      .on(\"end\", function() {\n        process.exit();\n      });\n  });\n\n  // define guppy and its dependency hook to pre-commit.\n  var guppy = require(\"guppy);\n  guppy.init(gulp)\n  guppy.tasks[\"pre-commit\"].dep.push(\"check\")\n```\n\nAn attempt to commit will result in failure if the code does not pass the check.\n\n```\nmdesales@ubuntu [11/16/201416:28:31] /tmp/sp-quality (master *+) $ git commit\n[16:28:34] Using gulpfile /tmp/sp-quality/Gulpfile.js\n[16:28:34] Starting 'check'...\n[16:28:35] Finished 'check' after 69 ms\n[16:28:35] Starting 'pre-commit'...\n\n/tmp/sp-quality/src/index.js\n  line 34  col 33  Missing semicolon.\n  line 52  col 19  Missing semicolon.\n  line 53  col 46  Missing semicolon.\n\n✖ 3 problems\n```\n\nHowever, you will be able to commit the code if the check passes!\n\n```\nmdesales@ubuntu [11/16/201416:26:57] /tmp/sp-quality (master *+) $ git commit\n[16:27:02] Using gulpfile /tmp/sp-quality/Gulpfile.js\n[16:27:02] Starting 'check'...\n[16:27:02] Finished 'check' after 71 ms\n[16:27:02] Starting 'pre-commit'...\n```\n\nIf you are certain to by-pass the errors, you can use git's switch --no-verify.\nThat way, the hook will NOT even be triggered!\n\n# Git Guppy Core\n\nFor full detail about the core of the project, please go to https://github.com/therealklanni/git-guppy.\n\n## Authors\n\n**Kevin Lanni**\n \n+ [github/therealklanni](https://github.com/therealklanni)\n+ [twitter/therealklanni](http://twitter.com/therealklanni) \n\n** Modular Hooks Architecture **\n\n+ [github/marcellodesales](http://github.com/marcellodesales)\n+ [twitter/marcellodesales](http://twitter.com/marcellodesales)\n\n## License\nCopyright (c) 2014 Marcello de Sales, contributors.\nReleased under the MIT license\n***\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcellodesales%2Fgit-guppy-pre-commit-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcellodesales%2Fgit-guppy-pre-commit-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcellodesales%2Fgit-guppy-pre-commit-hook/lists"}