Skip to content

Commit

Permalink
chore(docs): expand instructions for first-time setup
Browse files Browse the repository at this point in the history
  • Loading branch information
bencromwell authored Oct 16, 2024
1 parent e017e72 commit 1c03471
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,53 @@ 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
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`.

0 comments on commit 1c03471

Please sign in to comment.