Skip to content

Commit 5cb59d8

Browse files
committed
Added a note about local development to examples that use build extensions
1 parent 2d350b8 commit 5cb59d8

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

docs/examples/ffmpeg-video-processing.mdx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebarTitle: "FFmpeg video processing"
44
description: "These examples show you how to process videos in various ways using FFmpeg with Trigger.dev."
55
---
66

7+
import LocalDevelopment from "/snippets/local-development-extensions.mdx";
8+
79
## Adding the FFmpeg build extension
810

911
To use these example tasks, you'll first need to add our FFmpeg extension to your project configuration like this:
@@ -33,7 +35,7 @@ You'll also need to add `@trigger.dev/build` to your `package.json` file under `
3335

3436
This task demonstrates how to use FFmpeg to compress a video, reducing its file size while maintaining reasonable quality, and upload the compressed video to R2 storage.
3537

36-
### Key Features:
38+
### Key Features
3739

3840
- Fetches a video from a given URL
3941
- Compresses the video using FFmpeg with various compression settings
@@ -130,7 +132,7 @@ export const ffmpegCompressVideo = task({
130132
});
131133
```
132134

133-
### Testing:
135+
### Testing
134136

135137
To test this task, use this payload structure:
136138

@@ -144,7 +146,7 @@ To test this task, use this payload structure:
144146

145147
This task demonstrates how to use FFmpeg to extract audio from a video, convert it to WAV format, and upload it to R2 storage.
146148

147-
### Key Features:
149+
### Key Features
148150

149151
- Fetches a video from a given URL
150152
- Extracts the audio from the video using FFmpeg
@@ -239,7 +241,7 @@ export const ffmpegExtractAudio = task({
239241
});
240242
```
241243

242-
### Testing:
244+
### Testing
243245

244246
To test this task, use this payload structure:
245247

@@ -258,7 +260,7 @@ To test this task, use this payload structure:
258260

259261
This task demonstrates how to use FFmpeg to generate a thumbnail from a video at a specific time and upload the generated thumbnail to R2 storage.
260262

261-
### Key Features:
263+
### Key Features
262264

263265
- Fetches a video from a given URL
264266
- Generates a thumbnail from the video at the 5-second mark
@@ -358,3 +360,5 @@ To test this task in the dashboard, you can use the following payload:
358360
"videoUrl": "<video-url>"
359361
}
360362
```
363+
364+
<LocalDevelopment packages={"ffmpeg"} />

docs/examples/pdf-to-image.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebarTitle: "PDF to image"
44
description: "This example will show you how to turn a PDF into an image using MuPDF and Trigger.dev."
55
---
66

7+
import LocalDevelopment from "/snippets/local-development-extensions.mdx";
8+
79
## Overview
810

911
This example demonstrates how to use Trigger.dev to turn a PDF into a series of images using MuPDF and upload them to Cloudflare R2.
@@ -96,3 +98,7 @@ To test this task in the dashboard, you can use the following payload:
9698
"documentId": "unique-document-id"
9799
}
98100
```
101+
102+
<LocalDevelopment packages={"mupdf-tools from MuPDF"} />
103+
104+

docs/examples/react-pdf.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This example demonstrates how to use Trigger.dev to generate a PDF using `react-
1010

1111
## Task code
1212

13-
<Info> This example must be a .tsx file to use React components. </Info>
13+
<Info> This example must be a .tsx file to use React components.</Info>
1414

1515
```ts trigger/generateResumePDF.tsx
1616
import { logger, task } from "@trigger.dev/sdk/v3";

docs/examples/sharp-image-processing.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebarTitle: "Sharp image processing"
44
description: "This example demonstrates how to process images using the Sharp library with Trigger.dev."
55
---
66

7+
import LocalDevelopment from "/snippets/local-development-extensions.mdx";
8+
79
## Overview
810

911
This task optimizes and watermarks an image using the Sharp library, and then uploads the processed image to R2 storage.
@@ -130,3 +132,5 @@ To test this task in the dashboard, you can use the following payload:
130132
"watermarkUrl": "<an-image-url.png>" // Replace with a URL to a PNG watermark image
131133
}
132134
```
135+
136+
<LocalDevelopment packages={"the Sharp image processing library"} />
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Local development
2+
3+
To test this example task locally, be sure to install any packages from the build extensions you added to your `trigger.config.ts` file to your local machine. In this case, you need to install {packages}.

0 commit comments

Comments
 (0)