Skip to content

Commit 22fa84e

Browse files
committed
Minor tweaks and moved bun
1 parent 7accaa4 commit 22fa84e

10 files changed

+32
-33
lines changed

docs/examples/dall-e3-generate-image.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ function generateImagePrompt(theme: string, description: string): any {
6565
}
6666
```
6767

68-
## Testing
68+
## Testing your task
6969

70-
To test this task, you can use the following payload:
70+
To test this task in the dashboard, you can use the following payload:
7171

7272
```json
7373
{

docs/examples/ffmpeg-video-processing.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,9 @@ export const ffmpegGenerateThumbnail = task({
349349
});
350350
```
351351

352-
### Testing:
352+
## Testing your task
353353

354-
To test this task, use this payload structure:
354+
To test this task in the dashboard, you can use the following payload:
355355

356356
```json
357357
{

docs/examples/intro.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ sidebarTitle: "Introduction"
44
description: "Learn how to use Trigger.dev with these practical task examples."
55
---
66

7-
| Example task | Description |
8-
| :----------------------------------------------------------------- | :------------------------------------------------------------------------- |
9-
| [DALL·E 3 image generation](/examples/generate-image-with-dall-e3) | Use OpenAI's GPT-4o and DALL·E 3 to generate an image and text. |
10-
| [FFmpeg video processing](/examples/ffmpeg-video-processing) | Use FFmpeg to process a video and save it to Cloudflare R2. |
11-
| [OpenAI with retrying](/examples/open-ai-with-retrying) | Create a reusable OpenAI task with custom retry options. |
12-
| [React to PDF](/examples/react-pdf) | Use `react-pdf` to generate a PDF and save it to Cloudflare R2. |
13-
| [Resend email sequence](/examples/resend-email-sequence) | Send a sequence of emails over several days using Resend with Trigger.dev. |
14-
| [Sharp image processing](/examples/sharp-image-processing) | Use Sharp to process an image and save it to Cloudflare R2. |
15-
| [Vercel AI SDK](/examples/vercel-ai-sdk) | Use Vercel AI SDK to generate text using OpenAI. |
7+
| Example task | Description |
8+
| :----------------------------------------------------------------- | :-------------------------------------------------------------------------- |
9+
| [DALL·E 3 image generation](/examples/generate-image-with-dall-e3) | Use OpenAI's GPT-4o and DALL·E 3 to generate an image and text. |
10+
| [FFmpeg video processing](/examples/ffmpeg-video-processing) | Use FFmpeg to process a video in various ways and save it to Cloudflare R2. |
11+
| [OpenAI with retrying](/examples/open-ai-with-retrying) | Create a reusable OpenAI task with custom retry options. |
12+
| [React to PDF](/examples/react-pdf) | Use `react-pdf` to generate a PDF and save it to Cloudflare R2. |
13+
| [Resend email sequence](/examples/resend-email-sequence) | Send a sequence of emails over several days using Resend with Trigger.dev. |
14+
| [Sharp image processing](/examples/sharp-image-processing) | Use Sharp to process an image and save it to Cloudflare R2. |
15+
| [Vercel AI SDK](/examples/vercel-ai-sdk) | Use Vercel AI SDK to generate text using OpenAI. |

docs/examples/open-ai-with-retrying.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ export const openaiTask = task({
4545
});
4646
```
4747

48-
## Testing
48+
## Testing your task
4949

50-
To test this task, you can use the following payload:
50+
To test this task in the dashboard, you can use the following payload:
5151

5252
```json
5353
{

docs/examples/react-pdf.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ export const generateResumePDF = task({
7474
});
7575
```
7676

77-
### Testing
77+
## Testing your task
7878

79-
To test this task, you can use the following payload:
79+
To test this task in the dashboard, you can use the following payload:
8080

8181
```json
8282
{

docs/examples/resend-email-sequence.mdx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const emailSequence = task({
2222
run: async (payload: { userId: string; email: string; name: string }) => {
2323
console.log(`Start email sequence for user ${payload.userId}`, payload);
2424

25-
//send the first email immediately
25+
// Send the first email immediately
2626
const firstEmailResult = await retry.onThrow(
2727
async ({ attempt }) => {
2828
const { data, error } = await resend.emails.send({
@@ -33,7 +33,7 @@ export const emailSequence = task({
3333
});
3434

3535
if (error) {
36-
//throwing an error will trigger a retry of this block
36+
// Throwing an error will trigger a retry of this block
3737
throw error;
3838
}
3939

@@ -42,10 +42,10 @@ export const emailSequence = task({
4242
{ maxAttempts: 3 }
4343
);
4444

45-
//then wait 3 days
45+
// Then wait 3 days
4646
await wait.for({ days: 3 });
4747

48-
//send the second email
48+
// Send the second email
4949
const secondEmailResult = await retry.onThrow(
5050
async ({ attempt }) => {
5151
const { data, error } = await resend.emails.send({
@@ -56,7 +56,7 @@ export const emailSequence = task({
5656
});
5757

5858
if (error) {
59-
//throwing an error will trigger a retry of this block
59+
// Throwing an error will trigger a retry of this block
6060
throw error;
6161
}
6262

@@ -70,15 +70,14 @@ export const emailSequence = task({
7070
});
7171
```
7272

73-
### Testing
73+
## Testing your task
7474

75-
To test this task, you can use the following payload:
75+
To test this task in the dashboard, you can use the following payload:
7676

7777
```json
7878
{
7979
"userId": "123",
80-
// Replace with your test email
81-
"email": "<your-test-email>",
80+
"email": "<your-test-email>", // Replace with your test email
8281
"name": "Alice Testington"
8382
}
8483
```

docs/examples/sharp-image-processing.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ export const sharpProcessImage = task({
120120
});
121121
```
122122

123-
### Testing
123+
## Testing your task
124124

125-
To test this task, use this payload structure:
125+
To test this task in the dashboard, you can use the following payload:
126126

127127
```json
128128
{
129-
"imageUrl": "<an-image-url.jpg>",
130-
"watermarkUrl": "<an-image-url.png>"
129+
"imageUrl": "<an-image-url.jpg>", // Replace with a URL to a JPEG image
130+
"watermarkUrl": "<an-image-url.png>" // Replace with a URL to a PNG watermark image
131131
}
132132
```

docs/examples/vercel-ai-sdk.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ export const openaiTask = task({
4242
});
4343
```
4444

45-
### Testing
45+
## Testing your task
4646

47-
To test this task, you can use the following payload:
47+
To test this task in the dashboard, you can use the following payload:
4848

4949
```json
5050
{
File renamed without changes.

docs/mint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
"pages": [
248248
"guides/frameworks/introduction",
249249
"guides/frameworks/nodejs",
250-
"guides/bun",
250+
"guides/frameworks/bun",
251251
"guides/frameworks/nextjs",
252252
"guides/frameworks/remix",
253253
{

0 commit comments

Comments
 (0)