npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

git-haki

v1.0.6

Published

Haki is a simple way to configure git hook

Downloads

12

Readme

[email protected]

git-haki

A simple way to add git hooks. Hooks enable team to only push quality code. Haki makes it easier to create hooks.

Git-haki is a simple node module which can be leveraged for git hooks to achieve automation of build tasks with code commit and push. It is not task runner specific and expects simple configuration with hook name and tasks needs to be run with that hook.

Advanatage of git-haki over existing hooks:

1)pre-commit:-

pre-commit hooks runs while you commit the code.It will run the tasks on the entire code base 
but it will not check for staged or unstaged files.
If the fixes or buggy code in unstaged files,it will leads to buggy code in Dev branch.

To avoid this,git-haki will ask user to commit all the code i.e, all the code changes should be staged 
and there should not be any unstaged files.
So,that tasks run on proper code base in achieving error free code commit in to the branch.

2)pre-push:-

pre-push hooks runs while you push the code.It will run the tasks on the entire code base
but it will not check for staged or unstaged files.
If the fixes or buggy code in staged/unstaged files,it will leads to buggy code in Dev branch.

To avoid this,git-haki will ask user to commit all the code i.e,
all the code changes should be staged and committed.There should not be any staged/unstaged files before push.

So,that tasks run on proper code base in achieving error free code push in to the branch.

Installation

npm install git-haki --save-dev

This will install the git-haki as devdependencies.

Usage

To use

const GitHaki = require('git-haki');

create a gulp/grunt task with task runner and use the following code and run the task once.

GitHaki([{ name: 'pre-commit', command: 'npm test', bashDest: "Relative path to '.git/hooks' directory" // by default it would take '.git/hooks' in root directory if not given }]);

This will create pre commit git hook which will run npm test script specified in your projects package json.

If you want to to update the command with adding or modifying the tasks,you need to run the grunt/gulp task again to update the hooks.

Slack integartion

Added slack integration

Limitation

Supports only pre-commit and pre-push git hooks

Future

Will add support for

  • Other git hooks
  • Run from command line with configuraion file and options
  • Logging issues

How can you help

  • Please log issues or feature requests
  • Create PRs with feature request by forking repo (raise PR only to DEVELOP branch)
  • Help in creating and improving documentation