Skip to content

Commit 67115ca

Browse files
authored
Contributing guide updates (#1784)
1 parent de4ee19 commit 67115ca

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,23 +135,22 @@ The following steps should be followed any time you start working on a new featu
135135

136136
1. Make sure the webapp is running on localhost:3030
137137

138-
2. Open a terminal window and build the CLI and watch for changes
138+
2. Open a terminal window and build the CLI and packages and watch for changes
139139

140140
```sh
141-
pnpm run dev --filter trigger.dev
141+
pnpm run dev --filter trigger.dev --filter "@trigger.dev/*"
142142
```
143143

144-
2. Open a new terminal window, and anytime changes are made to the `@trigger.dev/core` package, you'll need to manually rebuild the CLI:
144+
3. Open another terminal window, and change into the `<root>/references/v3-catalog` directory.
145+
146+
4. You'll need to run the following commands to setup prisma and migrate the database:
145147

146148
```sh
147-
pnpm run build --filter trigger.dev
149+
pnpm exec prisma migrate deploy
150+
pnpm run generate:prisma
148151
```
149152

150-
Note: You do not need to do the same for `@trigger.dev/sdk`, just core.
151-
152-
3. Open another terminal window, and change into the `<root>/references/v3-catalog` directory.
153-
154-
4. Run the `dev` command, which will register all the local tasks with the platform and allow you to start testing task execution:
153+
5. Run the `dev` command, which will register all the local tasks with the platform and allow you to start testing task execution:
155154

156155
```sh
157156
# in <root>/references/v3-catalog
@@ -165,13 +164,13 @@ If you want additional debug logging, you can use the `--log-level debug` flag:
165164
pnpm exec trigger dev --log-level debug
166165
```
167166

168-
5. If you make any changes in the CLI/Core/SDK, you'll need to `CTRL+C` to exit the `dev` command and restart it to pickup changes. Any changes to the files inside of the `v3-catalog/src/trigger` dir will automatically be rebuilt by the `dev` command.
167+
6. If you make any changes in the CLI/Core/SDK, you'll need to `CTRL+C` to exit the `dev` command and restart it to pickup changes. Any changes to the files inside of the `v3-catalog/src/trigger` dir will automatically be rebuilt by the `dev` command.
169168

170-
6. Navigate to the `v3-catalog` project in your local dashboard at localhost:3030 and you should see the list of tasks.
169+
7. Navigate to the `v3-catalog` project in your local dashboard at localhost:3030 and you should see the list of tasks.
171170

172-
7. Go to the "Test" page in the sidebar and select a task. Then enter a payload and click "Run test". You can tell what the payloads should be by looking at the relevant task file inside the `/references/v3-catalog/src/trigger` folder. Many of them accept an empty payload.
171+
8. Go to the "Test" page in the sidebar and select a task. Then enter a payload and click "Run test". You can tell what the payloads should be by looking at the relevant task file inside the `/references/v3-catalog/src/trigger` folder. Many of them accept an empty payload.
173172

174-
8. Feel free to add additional files in `v3-catalog/src/trigger` to test out specific aspects of the system, or add in edge cases.
173+
9. Feel free to add additional files in `v3-catalog/src/trigger` to test out specific aspects of the system, or add in edge cases.
175174

176175
## Running end-to-end webapp tests (deprecated)
177176

@@ -240,11 +239,12 @@ pnpm run db:studio
240239

241240
4. Run the migration.
242241

243-
```
244-
pnpm run db:migrate:deploy
245-
pnpm run generate
246-
```
247-
This executes the migrations against your database and applies changes to the database schema(s), and then regenerates the Prisma client.
242+
```
243+
pnpm run db:migrate:deploy
244+
pnpm run generate
245+
```
246+
247+
This executes the migrations against your database and applies changes to the database schema(s), and then regenerates the Prisma client.
248248

249249
4. Commit generated migrations as well as changes to the schema.prisma file
250250
5. If you're using VSCode you may need to restart the Typescript server in the webapp to get updated type inference. Open a TypeScript file, then open the Command Palette (View > Command Palette) and run `TypeScript: Restart TS server`.

references/v3-catalog/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ TRIGGER_API_URL=
33
OPENAI_API_KEY="My API Key"
44
UPLOADTHING_SECRET="My Secret"
55
UPLOADTHING_APP_ID="My App ID"
6+
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/v3-catalog-prisma?schema=public
7+
DATABASE_URL_UNPOOLED=postgresql://postgres:postgres@localhost:5432/v3-catalog-prisma?schema=public

0 commit comments

Comments
 (0)