All Projects → tarmolov → Git Hooks Js

tarmolov / Git Hooks Js

A tool to manage and run project git hooks

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Git Hooks Js

Tabs
React tabs with hooks
Stars: ✭ 147 (-6.96%)
Mutual labels:  hooks
Papercut Smtp
Papercut SMTP -- The Simple Desktop Email Server
Stars: ✭ 2,094 (+1225.32%)
Mutual labels:  development
React Native Web Hooks
Hooks for React Native web and Expo
Stars: ✭ 157 (-0.63%)
Mutual labels:  hooks
React Universal Hooks
🎉 React Universal Hooks : just use****** everywhere (Functional or Class Component). Support React DevTools!
Stars: ✭ 148 (-6.33%)
Mutual labels:  hooks
React Infinite Scroll Hook
A simple hook to create infinite scroll list components
Stars: ✭ 151 (-4.43%)
Mutual labels:  hooks
React Model
The next generation state management library for React
Stars: ✭ 153 (-3.16%)
Mutual labels:  hooks
React Storage Hooks
React hooks for persistent state
Stars: ✭ 146 (-7.59%)
Mutual labels:  hooks
Haunted
React's Hooks API implemented for web components 👻
Stars: ✭ 2,197 (+1290.51%)
Mutual labels:  hooks
Gulp Server Io
Standalone / gulp (stream) / delivery server setup with Proxy options remote debugger and more
Stars: ✭ 152 (-3.8%)
Mutual labels:  development
Nitro
Speedy local dev environment for @craftcms
Stars: ✭ 156 (-1.27%)
Mutual labels:  development
Distormx
The ultimate hooking library
Stars: ✭ 146 (-7.59%)
Mutual labels:  hooks
React Use Clipboard
React hook that provides copy to clipboard functionality.
Stars: ✭ 149 (-5.7%)
Mutual labels:  hooks
Use Url State
Lift a React component's state into the url
Stars: ✭ 154 (-2.53%)
Mutual labels:  hooks
Python Sploitkit
Devkit for building Metasploit-like consoles
Stars: ✭ 148 (-6.33%)
Mutual labels:  development
Use Callback Ref
🤙The same useRef, but it will callback
Stars: ✭ 157 (-0.63%)
Mutual labels:  hooks
Awesome Http Benchmark
HTTP(S) benchmark tools, testing/debugging, & restAPI (RESTful)
Stars: ✭ 2,236 (+1315.19%)
Mutual labels:  development
Guides
Design and development guides
Stars: ✭ 1,880 (+1089.87%)
Mutual labels:  development
React Native Swiper Hooks
✨A powerful Swiper hooks component for React Native
Stars: ✭ 159 (+0.63%)
Mutual labels:  hooks
Koding
The Simplest Way to Manage Your Entire Dev Infrastructure!
Stars: ✭ 1,945 (+1131.01%)
Mutual labels:  development
React Intersection Observer
React implementation of the Intersection Observer API to tell you when an element enters or leaves the viewport.
Stars: ✭ 2,689 (+1601.9%)
Mutual labels:  hooks

git-hooks-js

NPM version Build Status Coverage Status Dependency Status npm

git-hooks is an utility for managing and running project git hooks for nodejs projects.

It has zero dependecies and easy to use.

Just install git-hooks and it will run your hooks when a hook is called by git.

Why do you need git hooks in your project?

Hooks are little scripts you can place in $GIT_DIR/hooks directory to trigger action at certain points.

They are very powerful and helpful.

You can do a lot of things with them:

Note. When you use git-hooks, you should not modify $GIT_DIR/hooks directory manually because git-hooks will do it for you.

Supported platforms

  • Unix
  • macOS

Install

Install git-hooks in your project.

npm install git-hooks --save-dev

To keep things organized, git-hooks looks for scripts in sub-directories named after the git hook name. All these sub-directories should be stored in .githooks directory in the project root.

Let's create some dummy pre-commit hook.

mkdir -p .githooks/pre-commit
echo -e '#!/usr/bin/env node' "\nconsole.log('hi!');" > .githooks/pre-commit/hello.js
chmod +x .githooks/pre-commit/hello.js

Then just try to commit and see how things are rolling.

git add .githooks package.json
git commit -m "Add git-hooks"

See also hooks examples.

It's worth to mention that our library checks for gitignore rules while executing scripts in .githooks/ directories.

Related projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].