projen-husky
v0.3.27
Published
A projen component for maintaining Git hooks with Husky.
Readme
projen-husky
A projen component for managing Git hooks with Husky.
Usage
Install dependencies:
npm install -D projen husky projen-huskyThen, create a Husky component for your root project:
import { Project } from 'projen'
import { Husky } from 'projen-husky'
const project = new Project({
name: 'my-project',
})
new Husky(project, {
'pre-commit': 'npm run lint',
'pre-push': ['npm run test', 'npm run build'],
})Each key is the name of a Git hook, and its value a command or a list of
commands to run in order. The component writes them to .husky/<hook>, but does
not set up Husky itself: add a prepare script that runs husky.
