Skip to content
/ husky Public

opinionated scaffolder for configuring Git hooks using husky

License

Notifications You must be signed in to change notification settings

form8ion/husky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

husky

opinionated scaffolder for configuring Git hooks using husky

Node CI Workflow Status Codecov SLSA Level 2

Table of Contents

Usage

MIT license npm Try @form8ion/husky on RunKit node

Installation

$ npm install @form8ion/husky --save

Example

Import

import {lift, scaffold, test} from './lib/index.cjs';

Execute

(async () => {
  await scaffold({projectRoot: process.cwd(), packageManager: 'foo'});

  await test({projectRoot: process.cwd()});

  await lift({projectRoot: process.cwd(), packageManager: 'foo'});
})();

API

scaffold

Scaffolder for configuring git hooks programatically through the use of husky

Takes a single options object as an argument, containing:

projectRoot string (required)

path to the root of the project

packageManager string (required)

chosen package manager to be used for the project

pathWithinParent string (optional)

path within a parent project when scaffolding a sub-project

test

Predicate for determining whether the lift functionality should be applied to the current project. Identifies if husky is currently in use for the project.

Takes a single options object as an argument, containing:

projectRoot string (required)

path to the root of the project

lift

Lifter for adjusting configuration of git hooks programatically through the use of husky

Takes a single options object as an argument, containing:

projectRoot string (required)

path to the root of the project

packageManager string (required)

chosen package manager to be used for the project

Contributing

PRs Welcome Commitizen friendly Conventional Commits semantic-release Renovate

Dependencies

$ nvm install
$ npm install

Verification

$ npm test