Skip to content

Commit

Permalink
chore: upgrade typedoc
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Nov 27, 2024
1 parent b642159 commit f89f5e4
Show file tree
Hide file tree
Showing 231 changed files with 8,338 additions and 7,523 deletions.
22 changes: 15 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
imagetools / [Modules](modules.md)
**imagetools**[**Docs**](modules.md)

***

**imagetools**[**Docs**](_media/modules.md)

***

imagetools / [Modules](_media/modules-1.md)

# Imagetools documentation

Expand All @@ -8,13 +16,13 @@ unclear!

## Basic

- [Why?](guide/why.md)
- [Install](guide/install.md)
- [Getting Started](guide/getting-started.md)
- [All directives](directives.md)
- [Why?](_media/why.md)
- [Install](_media/install.md)
- [Getting Started](_media/getting-started.md)
- [All directives](_media/directives.md)

## Dive deeper

- [Extend Imagetools](guide/extending.md)
- [Extend Imagetools](_media/extending.md)
- [Sharp's documentation](https://sharp.pixelplumbing.com)
- [Caching](guide/caching.md)
- [Caching](_media/caching.md)
46 changes: 46 additions & 0 deletions docs/_media/caching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Caching

To speed up a build pipeline with many images, the generated images can be cached on disk.
If the source image changes, the cached images will be regenerated.

## How to configure caching

Caching is enabled by default and uses './node_modules/.cache/imagetools' as the cache directory.
You can disable caching or change the directory with options.

```
// vite.config.js, etc
...
plugins: [
react(),
imagetools({
cache: {
enabled: true,
dir: './node_modules/.cache/imagetools'
}
})
]
...
```

## Cache retention to remove unused images

When an image is no longer there or the transformation parameters change, the previously
cached images will be removed after a configurable retention period.
A value of `undefined` will disable this mechanism, which is the default.

```
// vite.config.js, etc
...
plugins: [
react(),
imagetools({
cache: {
enabled: true,
dir: './node_modules/.cache/imagetools',
retention: 172800
}
})
]
...
```
Loading

0 comments on commit f89f5e4

Please sign in to comment.