Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,29 @@ This puts both bins on your project's `PATH`.

## Usage

Wire the bins into your `package.json` scripts (bare names — `npm run` puts
`node_modules/.bin` on the `PATH`):

```json
"scripts": {
"check:links": "lychee-norm-cache",
"refcache": "refcache"
}
```

```sh
npx lychee-norm-cache # check links, then sort/normalize the cache
npx refcache --summary # cache stats (count, oldest, status, ages)
npm run check:links # check links, then sort/normalize the cache
npm run refcache -- --summary # cache stats (count, oldest, status, ages)
```

> [!WARNING]
>
> Don't invoke these bins via `npx`: this package isn't on the npm registry, so
> on a stale or missing `node_modules`, `npx` falls back to the public registry
> and runs **whatever package holds the name there** (the `lychee-norm-cache`
> name is squatted). Bare bin names in `npm run` scripts resolve locally or fail
> loudly — they never touch the registry.

`lychee-norm-cache` runs in the current directory (your site root) and forwards
any extra arguments to lychee. Run either tool with `--help` for its full
options, and `lychee --help` for the link-checking flags `lychee-norm-cache`
Expand Down