diff --git a/apps/api/project.json b/apps/api/project.json index f476479..b9f9ec3 100644 --- a/apps/api/project.json +++ b/apps/api/project.json @@ -8,6 +8,7 @@ "executor": "@nx/esbuild:esbuild", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", + "dependsOn": ["prisma-generate"], "options": { "platform": "node", "outputPath": "dist/apps/api", @@ -36,6 +37,7 @@ "serve": { "executor": "@nx/js:node", "defaultConfiguration": "development", + "dependsOn": ["build"], "options": { "buildTarget": "api:build" @@ -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" + } } } } diff --git a/apps/web/project.json b/apps/web/project.json index 4f46701..3947796 100644 --- a/apps/web/project.json +++ b/apps/web/project.json @@ -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": {} } diff --git a/nx.json b/nx.json index 51ddb48..5cad663 100644 --- a/nx.json +++ b/nx.json @@ -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": [ { @@ -48,10 +30,6 @@ } ], "targetDefaults": { - "build": { - "dependsOn": ["^build"], - "inputs": ["production", "^production"] - }, "e2e-ci--**/*": { "dependsOn": ["^build"] }, "@nx/esbuild:esbuild": { "cache": true,