|
6 | 6 | "files": [ |
7 | 7 | "dist" |
8 | 8 | ], |
9 | | - "scripts": { |
10 | | - "shell": "firebase functions:shell", |
11 | | - "emulate": "firebase emulators:start --only functions,firestore --project demo-local", |
12 | | - "logs": "firebase functions:log", |
13 | | - "build": "tsc", |
14 | | - "deploy": "npm run build && firebase deploy --project $npm_config_project --only functions", |
15 | | - "watch": "tsc --watch" |
16 | | - }, |
17 | 9 | "nx": { |
18 | 10 | "name": "functions", |
19 | 11 | "targets": { |
| 12 | + "build": { |
| 13 | + "executor": "nx:run-commands", |
| 14 | + "options": { |
| 15 | + "cwd": "{projectRoot}", |
| 16 | + "command": "tsc" |
| 17 | + } |
| 18 | + }, |
20 | 19 | "clean": { |
21 | | - "command": "rm -rf dist *.log" |
| 20 | + "executor": "nx:run-commands", |
| 21 | + "options": { |
| 22 | + "cwd": "{projectRoot}", |
| 23 | + "command": "rm -rf dist *.log" |
| 24 | + } |
22 | 25 | }, |
23 | 26 | "lint": { |
24 | | - "command": "eslint src" |
| 27 | + "executor": "nx:run-commands", |
| 28 | + "options": { |
| 29 | + "cwd": "{projectRoot}", |
| 30 | + "command": "eslint src" |
| 31 | + } |
25 | 32 | }, |
26 | 33 | "test": { |
27 | | - "command": "jasmine --config=jasmine.json", |
| 34 | + "executor": "nx:run-commands", |
| 35 | + "options": { |
| 36 | + "cwd": "{projectRoot}", |
| 37 | + "command": "jasmine --config=jasmine.json" |
| 38 | + }, |
28 | 39 | "dependsOn": [ |
29 | 40 | "build" |
30 | 41 | ] |
31 | 42 | }, |
32 | 43 | "format:check": { |
33 | 44 | "executor": "nx:run-commands", |
34 | 45 | "options": { |
| 46 | + "cwd": "{projectRoot}", |
35 | 47 | "command": "prettier --check \"src/**/*.ts\"" |
36 | 48 | } |
| 49 | + }, |
| 50 | + "shell": { |
| 51 | + "command": "firebase functions:shell" |
| 52 | + }, |
| 53 | + "emulate": { |
| 54 | + "command": "firebase emulators:start --only functions,firestore --project demo-local" |
| 55 | + }, |
| 56 | + "logs": { |
| 57 | + "command": "firebase functions:log" |
| 58 | + }, |
| 59 | + "deploy": { |
| 60 | + "executor": "nx:run-commands", |
| 61 | + "configurations": { |
| 62 | + "staging": { |
| 63 | + "command": "firebase deploy --project ground-dev-sig --only functions" |
| 64 | + }, |
| 65 | + "production": { |
| 66 | + "command": "firebase deploy --project YOUR-PROD-PROJECT --only functions" |
| 67 | + } |
| 68 | + }, |
| 69 | + "dependsOn": ["build"] |
| 70 | + }, |
| 71 | + "watch": { |
| 72 | + "executor": "nx:run-commands", |
| 73 | + "options": { |
| 74 | + "cwd": "{projectRoot}", |
| 75 | + "command": "tsc --watch" |
| 76 | + } |
37 | 77 | } |
38 | 78 | } |
39 | 79 | }, |
|
0 commit comments