From d388ca421f2faea8bcbe9a86f9804821d6f91075 Mon Sep 17 00:00:00 2001 From: Bela VanderVoort Date: Sun, 16 Jun 2024 15:44:54 -0500 Subject: [PATCH] update website copy of doc --- Src/Website/docs/Pre-commit.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Src/Website/docs/Pre-commit.md b/Src/Website/docs/Pre-commit.md index f2091edf0..4a57e7203 100644 --- a/Src/Website/docs/Pre-commit.md +++ b/Src/Website/docs/Pre-commit.md @@ -53,21 +53,12 @@ repos: From the root of your repository ```bash +cd +dotnet new tool-manifest dotnet tool install husky dotnet husky install ``` -Optionally - add this to one of your projects to automate the install for future developers -```xml - - - - - WorkingDirectory="../../" /> - -``` - Modify the file at `.husky/task-runner.json` ```json { @@ -85,6 +76,12 @@ You can run and test your task with the following command. dotnet husky run ``` +Optionally - add this to one of your projects to automate the installation for future developers +You can set the HUSKY environment variable to 0 to disable Husky in CI/CD pipelines. +```bash +dotnet husky attach +``` + Once you are sure the task is working properly, you can add it as a pre-commit hook. ```bash dotnet husky add pre-commit -c "dotnet husky run"