@zuke/husky
`@zuke/husky` — typed `husky` task wrappers for Zuke builds.
@zuke/husky on JSR ↗ 5 symbols
Symbols
class HuskyInitSettings extends HuskySettings Settings for husky init [dir] — scaffold husky in a project: create the hooks directory, add a sample pre-commit hook, and wire up the prepare script. This is the canonical husky v9 setup command.
| Member | Signature | Doc |
|---|---|---|
dir | dir(path: PathLike): this | The hooks directory to initialise (positional; defaults to .husky). |
class HuskyInstallSettings extends HuskySettings Settings for installing Git hooks by invoking husky [dir] bare.
husky v9 removed the old install subcommand: running husky with no subcommand is what installs the hooks (an optional directory may follow). This task therefore emits the bare husky invocation — its default argv is just ["husky"], not ["husky", "install"].
| Member | Signature | Doc |
|---|---|---|
dir | dir(path: PathLike): this | The hooks directory to install into (positional; defaults to .husky). |
class HuskySettings extends ToolSettings Shared base for every husky invocation: the binary and argv assembly.
const HuskyTasks: HuskyTasksApi Typed task functions for the husky Git-hooks tool.
interface HuskyTasksApi The shape of HuskyTasks.
| Member | Signature | Doc |
|---|---|---|
init | init(configure?: Configure<HuskyInitSettings>): Promise<CommandOutput> | Scaffold husky in a project: husky init [dir]. |
install | install(configure?: Configure<HuskyInstallSettings>): Promise<CommandOutput> | Install Git hooks via the bare husky [dir] invocation (husky v9 removed the install subcommand). |