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-graft

v0.1.0

Published

NPX CLI tool that generates a configurable Git Hook that prepends branch name patterns to commit messages.

Downloads

13

Readme

git-graft

oclif Version Downloads/week License

NPX CLI tool that generates a configurable Git Hook that prepends branch name patterns to commit messages.

Features:

  • Generated Git Hook

  • Zero Config Option -- Utilizing GitFlow

    Best Practice Examples

  • Configurable git-graft.json

  • Hook is a bin file running Node & no dependencies

  • Validates the commit message and branch

  • Usage

  • Commands

Usage

$ npx git-graft (-v|--version|version)
git-graft/0.0.0 linux-x64 node-v14.16.1
$ npx git-graft --help
Main Usage
  $npx git-graft [COMMAND]
...

Commands

Init

init will generate the Git Hook with Zero-Config or a configuration file based on prompts.

example:

npx git-graft init

The prompts will be used to construct the configuration file and ask to modify permissions to allow for execution of the generated Git Hook. Without permission to execute the Git Hook cannot work.

Doctor

Will run file, directory, and permissions check on Git Graft Hook.

example:

// automatically gets filepath
$ npx git-graft doctor

// user gives filepath
$ npx git-graft doctor [FILEPATH] --force

Configuration File

The init generates a git-graft.json if Zero-Config isn't chosen. The config has properties for a configurable Git Hook. Configuration the patterns to validate the branch and resulting prepended commit message with branch information.

branchTypes:

RegExp List required -- Refers to GitFlow best practices. Git Graft Hook will wrap the list in () and the constructor includes the forward slash & escape \/ example

branchPattern:

RegExp required -- Refers to the code/ticket and name of the branch following the branchType. example

ticketTypes:

string required -- Refers to the ticket code types, for example JIRA will use TICKETTYPE-{NUMBERS}. The Git Hook will use this config to construct a RegExp for the prepending to commit messages.

regExFlag:

RegExp optional -- Flags to pass into RegEx constructors. Default: gim

ticketOnly:

boolean optional -- Used to determine if ticket/code or whole branch should used. Default: true


RegEx Examples:

Zero Config RegExp Usage - https://regex101.com/r/UKwIK2/1

branchPattern - https://regex101.com/r/ewym8B/1

branchTypes - https://regex101.com/r/KNZio4/1