README
husky
opinionated scaffolder for configuring Git hooks using husky
Table of Contents
Usage
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:
string (required) projectRoot
path to the root of the project
string (required) packageManager
chosen package manager to be used for the 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:
string (required) projectRoot
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:
string (required) projectRoot
path to the root of the project
string (required) packageManager
chosen package manager to be used for the project
Contributing
Dependencies
$ nvm install
$ npm install
Verification
$ npm test