76 lines
1.8 KiB
JSON
76 lines
1.8 KiB
JSON
{
|
|
"name": "api",
|
|
"$schema": "node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "src",
|
|
"projectType": "application",
|
|
"targets": {
|
|
"build": {
|
|
"executor": "@nx/esbuild:esbuild",
|
|
"outputs": ["{options.outputPath}"],
|
|
"defaultConfiguration": "production",
|
|
"options": {
|
|
"platform": "node",
|
|
"outputPath": "dist/api",
|
|
"format": ["cjs"],
|
|
"bundle": false,
|
|
"main": "src/main.ts",
|
|
"tsConfig": "tsconfig.app.json",
|
|
"assets": ["src/assets/**/**"],
|
|
"generatePackageJson": true,
|
|
"esbuildOptions": {
|
|
"sourcemap": true,
|
|
"outExtension": {
|
|
".js": ".js"
|
|
}
|
|
}
|
|
},
|
|
"configurations": {
|
|
"development": {},
|
|
"production": {
|
|
"generateLockfile": true,
|
|
"esbuildOptions": {
|
|
"sourcemap": false,
|
|
"outExtension": {
|
|
".js": ".js"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"serve": {
|
|
"executor": "@nx/js:node",
|
|
"defaultConfiguration": "development",
|
|
"options": {
|
|
"buildTarget": "api:build"
|
|
},
|
|
"configurations": {
|
|
"development": {
|
|
"buildTarget": "api:build:development"
|
|
},
|
|
"production": {
|
|
"buildTarget": "api:build:production"
|
|
}
|
|
}
|
|
},
|
|
"lint": {
|
|
"executor": "@nx/eslint:lint",
|
|
"outputs": ["{options.outputFile}"],
|
|
"options": {
|
|
"lintFilePatterns": ["./src"]
|
|
}
|
|
},
|
|
"test": {
|
|
"executor": "@nx/jest:jest",
|
|
"outputs": ["{workspaceRoot}/coverage/{projectName}"],
|
|
"options": {
|
|
"jestConfig": "jest.config.ts"
|
|
}
|
|
},
|
|
"docker-build": {
|
|
"dependsOn": ["build"],
|
|
"command": "docker build -f Dockerfile . -t api"
|
|
}
|
|
},
|
|
"tags": []
|
|
}
|