From 3e3f8805882165b0b5653186b2d22e41de802e13 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Fri, 10 Jan 2025 11:05:21 +0300 Subject: [PATCH] docs: drop stale docs (#917) --- README.md | 5 +- docs/configuration.md | 1503 +-------------------------------- docs/install.md | 177 +--- docs/mdbook/usage/README.md | 2 + docs/mdbook/usage/commands.md | 16 + docs/usage.md | 352 +------- 6 files changed, 26 insertions(+), 2029 deletions(-) diff --git a/README.md b/README.md index 3fd6bf33..5bd7149e 100644 --- a/README.md +++ b/README.md @@ -8,16 +8,17 @@ + A Git hooks manager for Node.js, Ruby, Python and many other types of projects. * **Fast.** It is written in Go. Can run commands in parallel. * **Powerful.** It allows to control execution and files you pass to your commands. * **Simple.** It is single dependency-free binary which can work in any environment. -📖 [Documentation][documentation] - 📖 [Read the introduction post](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook) +📖 [Read the documentation][documentation] + Sponsored by Evil Martians diff --git a/docs/configuration.md b/docs/configuration.md index 8e2dfcc5..233dba9a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,1504 +1,5 @@ -# Configure lefthook +# Lefthook configuration > [!IMPORTANT] > -> This documentation is stale and will be removed soon. Please check the new: https://evilmartians.github.io/lefthook/configuration/ - -Lefthook [supports](#config-file) YAML, JSON, and TOML configuration. In this document `lefthook.yml` is used for simplicity. - -## Config file - -Lefthook supports the following file names for the main config: - -- `lefthook.yml` -- `.lefthook.yml` -- `lefthook.yaml` -- `.lefthook.yaml` -- `lefthook.toml` -- `.lefthook.toml` -- `lefthook.json` -- `.lefthook.json` - -If there are more than 1 file in the project, only one will be used, and you'll never know which one. So, please, use one format in a project. - -Lefthook also merges an extra config with the name `lefthook-local`. All supported formats can be applied to this `-local` config. If you name your main config with the leading dot, like `.lefthook.json`, the `-local` config also must be named with the leading dot: `.lefthook-local.json`. - -Config options: -- [`assert_lefthook_installed`](#assert_lefthook_installed) -- [`colors`](#colors) -- [`no_tty`](#no_tty) -- [`extends`](#extends) -- [`min_version`](#min_version) -- [`output`](#output) -- [`skip_output`](#skip_output) -- [`source_dir`](#source_dir) -- [`source_dir_local`](#source_dir_local) -- [`rc`](#rc) -- [`remotes`](#remotes) - - [`git_url`](#git_url) - - [`ref`](#ref-1) - - [`refetch`](#refetch) - - [`refetch_frequency`](#refetch_frequency) - - [`configs`](#configs) -- [``](#hook-name) hook name - - [`files` (global)](#files-global) - - [`parallel`](#parallel) - - [`piped`](#piped) - - [`follow`](#follow) - - [`exclude_tags`](#exclude_tags) - - [`skip`](#skip) - - [`only`](#only) - - [`commands`](#commands) - - [``](#command) command name - - [`run`](#run) - - [`{files}` template](#files-template) - - [`{staged_files}` template](#staged_files-template) - - [`{push_files}` template](#push_files-template) - - [`{all_files}` template](#all_files-template) - - [`{cmd}` template](#cmd-template) - - [`skip`](#skip) - - [`only`](#only) - - [`tags`](#tags) - - [`glob`](#glob) - - [`files`](#files) - - [`file_types`](#file_types) - - [`env`](#env) - - [`root`](#root) - - [`exclude`](#exclude) - - [`fail_text`](#fail_text) - - [`stage_fixed`](#stage_fixed) - - [`interactive`](#interactive) - - [`use_stdin`](#use_stdin) - - [`priority`](#priority) - - [`scripts`](#scripts) - - [`