Skip to content

Commit e2fa602

Browse files
Brandon Chencodebuff-team
authored andcommitted
feat: use nx to run discord scripts
This commit updates the `discord:start` and `discord:register` scripts in `web/package.json` to use `nx run`. This aligns them with the project's task runner conventions. The corresponding nx tasks were also added to `web/project.json` to ensure they can be executed correctly. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
1 parent bb6e62a commit e2fa602

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

web/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"dev": "nx run web:dev",
77
"build": "nx run web:build",
8-
"start": "infisical run --log-level=warn -- nx run web:start",
8+
"start": "nx run web:start",
99
"preview": "nx run web:build && infisical run --log-level=warn -- nx run web:start",
1010
"contentlayer": "nx run web:contentlayer",
1111
"lint": "next lint",
@@ -18,8 +18,8 @@
1818
"test:watch": "jest --watchAll",
1919
"e2e": "playwright test",
2020
"e2e:ui": "playwright test --ui",
21-
"discord:start": "infisical run --log-level=warn -- bun run scripts/discord/index.ts",
22-
"discord:register": "infisical run --log-level=warn -- bun run scripts/discord/register-commands.ts"
21+
"discord:start": "nx run web:discord:start",
22+
"discord:register": "nx run web:discord:register"
2323
},
2424
"dependencies": {
2525
"@auth/drizzle-adapter": "^1.8.0",

web/project.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,30 @@
3838
"start": {
3939
"executor": "nx:run-commands",
4040
"options": {
41-
"command": "next start",
41+
"commands": [
42+
"if command -v infisical >/dev/null 2>&1; then infisical run -- next start; else next start; fi"
43+
],
4244
"cwd": "web"
4345
},
4446
"dependsOn": ["build"]
47+
},
48+
"discord:start": {
49+
"executor": "nx:run-commands",
50+
"options": {
51+
"commands": [
52+
"if command -v infisical >/dev/null 2>&1; then infisical run -- bun run scripts/discord/index.ts; else bun run scripts/discord/index.ts; fi"
53+
],
54+
"cwd": "web"
55+
}
56+
},
57+
"discord:register": {
58+
"executor": "nx:run-commands",
59+
"options": {
60+
"commands": [
61+
"if command -v infisical >/dev/null 2>&1; then infisical run -- bun run scripts/discord/register-commands.ts; else bun run scripts/discord/register-commands.ts; fi"
62+
],
63+
"cwd": "web"
64+
}
4565
}
4666
},
4767
"implicitDependencies": ["common", "@codebuff/billing"]

0 commit comments

Comments
 (0)