From 1c034714b6a8d3c126f6a4ab48a7b18c1bb20c70 Mon Sep 17 00:00:00 2001 From: Ben Cromwell <683855+bencromwell@users.noreply.github.com> Date: Wed, 16 Oct 2024 08:32:29 +0100 Subject: [PATCH 1/2] chore(docs): expand instructions for first-time setup --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 7f54580..14f766d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ This repository contains a [Vale-compatible](https://vale.sh/) implementation of ## Getting Started +### I have a `vale.ini` already + To get started, add the package to your configuration file (as shown below) and then run `vale sync`. ```ini @@ -11,4 +13,44 @@ StylesPath = styles # Use your normal style path here. Packages = https://github.com/krystal/vale-package/releases/latest/download/vale.zip ``` +### Add Vale to a project + +Create a `.vale.ini` at the project's root: +```ini +StylesPath = vale-styles # Location of styles directory +MinAlertLevel = suggestion # Options: suggestion, warning, error +Packages = https://github.com/krystal/vale-package/releases/latest/download/vale.zip + +[*.md] # Apply to markdown files +BasedOnStyles = Krystal +``` + See [Vale's documentation on packages](https://vale.sh/docs/topics/packages/) for more information. + +### Setup whilst the Vale package is a private repository + +Before we make this Vale package public, it cannot be downloaded via `vale sync` with the above config. We'll use the GitHub CLI to simplify grabbing an auth token. You may generate a `PAT` and use that instead if you wish. + +> [!TIP] +> Install the [GitHub CLI](https://cli.github.com/) and authenticate it first. + +```shell +curl -L -H "Authorization: token $(gh auth token)" \ + -o vale-package-0.1.0.zip \ + https://github.com/krystal/vale-package/archive/refs/tags/v0.1.0.zip +``` + +Add `vale-package.zip` to `.gitignore`. + +Create `.vale.ini`. + +```ini +StylesPath = vale-styles # Location of styles directory +MinAlertLevel = suggestion # Options: suggestion, warning, error +Packages = vale-package-0.1.0.zip + +[*.md] # Apply to markdown files +BasedOnStyles = Krystal +``` + +Run `vale sync`. From e62cef7601f2853fab51cfddd8966d87ea961bd8 Mon Sep 17 00:00:00 2001 From: Ben Cromwell <683855+bencromwell@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:12:34 +0100 Subject: [PATCH 2/2] chore(docs): remove private repo instruction --- README.md | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/README.md b/README.md index 14f766d..983796c 100644 --- a/README.md +++ b/README.md @@ -26,31 +26,3 @@ BasedOnStyles = Krystal ``` See [Vale's documentation on packages](https://vale.sh/docs/topics/packages/) for more information. - -### Setup whilst the Vale package is a private repository - -Before we make this Vale package public, it cannot be downloaded via `vale sync` with the above config. We'll use the GitHub CLI to simplify grabbing an auth token. You may generate a `PAT` and use that instead if you wish. - -> [!TIP] -> Install the [GitHub CLI](https://cli.github.com/) and authenticate it first. - -```shell -curl -L -H "Authorization: token $(gh auth token)" \ - -o vale-package-0.1.0.zip \ - https://github.com/krystal/vale-package/archive/refs/tags/v0.1.0.zip -``` - -Add `vale-package.zip` to `.gitignore`. - -Create `.vale.ini`. - -```ini -StylesPath = vale-styles # Location of styles directory -MinAlertLevel = suggestion # Options: suggestion, warning, error -Packages = vale-package-0.1.0.zip - -[*.md] # Apply to markdown files -BasedOnStyles = Krystal -``` - -Run `vale sync`.