opinionated scaffolder for configuring Git hooks using husky
npm install @form8ion/huskyopinionated scaffolder for configuring Git hooks
using husky
[![Node CI Workflow Status][github-actions-ci-badge]][github-actions-ci-link]
[![Codecov][coverage-badge]][coverage-link]
![SLSA Level 2][slsa-badge]
* Usage
* Installation
* Example
* Import
* Execute
* API
* scaffold
* projectRoot __string__ (_required_)
* packageManager __string__ (_required_)
* test
* lift
* projectRoot __string__ (_required_)
* packageManager __string__ (_required_)
* Contributing
* Dependencies
* Verification
[![MIT license][license-badge]][license-link]
[![npm][npm-badge]][npm-link]
[![Try @form8ion/husky on RunKit][runkit-badge]][runkit-link]
![node][node-badge]
``sh`
$ npm install @form8ion/husky --save
#### Import
`javascript`
import {lift, scaffold, test} from './lib/index.cjs';
#### Execute
`javascript
(async () => {
await scaffold({projectRoot: process.cwd(), packageManager: 'foo'});
await test({projectRoot: process.cwd()});
await lift({projectRoot: process.cwd(), packageManager: 'foo'});
})();
`
#### 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
[![PRs Welcome][PRs-badge]][PRs-link]
[![Commitizen friendly][commitizen-badge]][commitizen-link]
[![Conventional Commits][commit-convention-badge]][commit-convention-link]
[![semantic-release][semantic-release-badge]][semantic-release-link]
[![Renovate][renovate-badge]][renovate-link]
`sh`
$ nvm install
$ npm install
`sh``
$ npm test
[PRs-link]: http://makeapullrequest.com
[PRs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
[commitizen-link]: http://commitizen.github.io/cz-cli/
[commitizen-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
[commit-convention-link]: https://conventionalcommits.org
[commit-convention-badge]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
[semantic-release-link]: https://github.com/semantic-release/semantic-release
[semantic-release-badge]: https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release
[renovate-link]: https://renovatebot.com
[renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovatebot
[github-actions-ci-link]: https://github.com/form8ion/husky/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster
[github-actions-ci-badge]: https://img.shields.io/github/actions/workflow/status/form8ion/husky/node-ci.yml.svg?branch=master&logo=github
[license-link]: LICENSE
[license-badge]: https://img.shields.io/github/license/form8ion/husky.svg?logo=opensourceinitiative
[npm-link]: https://www.npmjs.com/package/@form8ion/husky
[npm-badge]: https://img.shields.io/npm/v/@form8ion/husky?logo=npm
[runkit-link]: https://npm.runkit.com/@form8ion/husky
[runkit-badge]: https://badge.runkitcdn.com/@form8ion/husky.svg
[node-badge]: https://img.shields.io/node/v/@form8ion/husky?logo=node.js
[coverage-link]: https://codecov.io/github/form8ion/husky
[coverage-badge]: https://img.shields.io/codecov/c/github/form8ion/husky?logo=codecov
[slsa-badge]: https://slsa.dev/images/gh-badge-level2.svg