Skip to content

Commit

Permalink
fix prisma targets
Browse files Browse the repository at this point in the history
  • Loading branch information
slikts committed Dec 25, 2024
1 parent 3674dda commit 2141a74
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 70 deletions.
37 changes: 37 additions & 0 deletions apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"executor": "@nx/esbuild:esbuild",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"dependsOn": ["prisma-generate"],
"options": {
"platform": "node",
"outputPath": "dist/apps/api",
Expand Down Expand Up @@ -36,6 +37,7 @@
"serve": {
"executor": "@nx/js:node",
"defaultConfiguration": "development",

"dependsOn": ["build"],
"options": {
"buildTarget": "api:build"
Expand All @@ -48,6 +50,41 @@
"buildTarget": "api:build:production"
}
}
},
"prisma-generate": {
"executor": "nx:run-commands",
"options": {
"command": "prisma generate",
"cwd": "apps/api"
}
},
"prisma-migrate": {
"executor": "nx:run-commands",
"options": {
"command": "prisma migrate dev",
"cwd": "apps/api"
}
},
"prisma-deploy": {
"executor": "nx:run-commands",
"options": {
"command": "prisma migrate deploy",
"cwd": "apps/api"
}
},
"prisma-reset": {
"executor": "nx:run-commands",
"options": {
"command": "prisma migrate reset",
"cwd": "apps/api"
}
},
"prisma-studio": {
"executor": "nx:run-commands",
"options": {
"command": "prisma studio",
"cwd": "apps/api"
}
}
}
}
48 changes: 2 additions & 46 deletions apps/web/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,6 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/web/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/apps/web",
"compiler": "babel",
"main": "apps/web/src/main.tsx",
"tsConfig": "apps/web/tsconfig.app.json",
"webpackConfig": "apps/web/webpack.config.js",
"assets": ["apps/web/src/assets"]
},
"configurations": {
"development": {
"extractLicenses": false,
"optimization": false,
"sourceMap": true,
"vendorChunk": true
},
"production": {
"optimization": true,
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false
}
}
},
"serve": {
"executor": "@nx/webpack:dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "web:build",
"hmr": true
},
"configurations": {
"development": {
"buildTarget": "web:build:development"
},
"production": {
"buildTarget": "web:build:production"
}
}
}
}
"tags": [],
"targets": {}
}
26 changes: 2 additions & 24 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
{
"extends": "nx/presets/npm.json",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"affected": {
"defaultBase": "main"
},
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "test", "lint"]
}
}
},
"namedInputs": {
"sharedGlobals": [],
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": [
"default",
"!{projectRoot}/.eslintrc.json",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",

"!{projectRoot}/tsconfig.spec.json"
]
"sharedGlobals": ["{workspaceRoot}/.github/workflows/ci.yml"],
"default": ["sharedGlobals"]
},
"plugins": [
{
Expand All @@ -48,10 +30,6 @@
}
],
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"e2e-ci--**/*": { "dependsOn": ["^build"] },
"@nx/esbuild:esbuild": {
"cache": true,
Expand Down

0 comments on commit 2141a74

Please sign in to comment.