diff --git a/docs/examples/ffmpeg-video-processing.mdx b/docs/examples/ffmpeg-video-processing.mdx index 31ca6a894..4309305cf 100644 --- a/docs/examples/ffmpeg-video-processing.mdx +++ b/docs/examples/ffmpeg-video-processing.mdx @@ -4,6 +4,8 @@ sidebarTitle: "FFmpeg video processing" description: "These examples show you how to process videos in various ways using FFmpeg with Trigger.dev." --- +import LocalDevelopment from "/snippets/local-development-extensions.mdx"; + ## Adding the FFmpeg build extension 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 ` 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. -### Key Features: +### Key Features - Fetches a video from a given URL - Compresses the video using FFmpeg with various compression settings @@ -130,7 +132,7 @@ export const ffmpegCompressVideo = task({ }); ``` -### Testing: +### Testing To test this task, use this payload structure: @@ -144,7 +146,7 @@ To test this task, use this payload structure: This task demonstrates how to use FFmpeg to extract audio from a video, convert it to WAV format, and upload it to R2 storage. -### Key Features: +### Key Features - Fetches a video from a given URL - Extracts the audio from the video using FFmpeg @@ -239,7 +241,7 @@ export const ffmpegExtractAudio = task({ }); ``` -### Testing: +### Testing To test this task, use this payload structure: @@ -258,7 +260,7 @@ To test this task, use this payload structure: 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. -### Key Features: +### Key Features - Fetches a video from a given URL - 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: "videoUrl": "" } ``` + + \ No newline at end of file diff --git a/docs/examples/pdf-to-image.mdx b/docs/examples/pdf-to-image.mdx index 13742667c..7caa58fdd 100644 --- a/docs/examples/pdf-to-image.mdx +++ b/docs/examples/pdf-to-image.mdx @@ -4,6 +4,8 @@ sidebarTitle: "PDF to image" description: "This example will show you how to turn a PDF into an image using MuPDF and Trigger.dev." --- +import LocalDevelopment from "/snippets/local-development-extensions.mdx"; + ## Overview 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: "documentId": "unique-document-id" } ``` + + + + diff --git a/docs/examples/react-pdf.mdx b/docs/examples/react-pdf.mdx index cfda52faa..f19ffb591 100644 --- a/docs/examples/react-pdf.mdx +++ b/docs/examples/react-pdf.mdx @@ -10,7 +10,7 @@ This example demonstrates how to use Trigger.dev to generate a PDF using `react- ## Task code - This example must be a .tsx file to use React components. + This example must be a .tsx file to use React components. ```ts trigger/generateResumePDF.tsx import { logger, task } from "@trigger.dev/sdk/v3"; diff --git a/docs/examples/sharp-image-processing.mdx b/docs/examples/sharp-image-processing.mdx index 76d781f6b..5259eff98 100644 --- a/docs/examples/sharp-image-processing.mdx +++ b/docs/examples/sharp-image-processing.mdx @@ -4,6 +4,8 @@ sidebarTitle: "Sharp image processing" description: "This example demonstrates how to process images using the Sharp library with Trigger.dev." --- +import LocalDevelopment from "/snippets/local-development-extensions.mdx"; + ## Overview 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: "watermarkUrl": "" // Replace with a URL to a PNG watermark image } ``` + + \ No newline at end of file diff --git a/docs/snippets/local-development-extensions.mdx b/docs/snippets/local-development-extensions.mdx new file mode 100644 index 000000000..bdd586c69 --- /dev/null +++ b/docs/snippets/local-development-extensions.mdx @@ -0,0 +1,3 @@ +## Local development + +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}. \ No newline at end of file