Skip to content

Commit 357d20d

Browse files
committed
Try to make the builds and configuration names clearer
1 parent 9c6b4df commit 357d20d

File tree

5 files changed

+44
-10
lines changed

5 files changed

+44
-10
lines changed

frontend/angular.json

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,39 @@
5959
"outputHashing": "all"
6060
},
6161
"development": {
62+
"fileReplacements": [
63+
{
64+
"replace": "src/environments/environment.ts",
65+
"with": "src/environments/environment.dev.ts"
66+
}
67+
],
68+
"budgets": [
69+
{
70+
"type": "initial",
71+
"maximumWarning": "500kB",
72+
"maximumError": "1MB"
73+
},
74+
{
75+
"type": "anyComponentStyle",
76+
"maximumWarning": "2kB",
77+
"maximumError": "4kB"
78+
}
79+
],
80+
"outputHashing": "all"
81+
},
82+
"local": {
6283
"optimization": false,
6384
"extractLicenses": false,
64-
"sourceMap": true
85+
"sourceMap": true,
86+
"fileReplacements": [
87+
{
88+
"replace": "src/environments/environment.ts",
89+
"with": "src/environments/environment.local.ts"
90+
}
91+
]
6592
}
6693
},
67-
"defaultConfiguration": "production"
94+
"defaultConfiguration": "development"
6895
},
6996
"serve": {
7097
"builder": "@angular-devkit/build-angular:dev-server",
@@ -74,9 +101,12 @@
74101
},
75102
"development": {
76103
"buildTarget": "interview-prep:build:development"
104+
},
105+
"local": {
106+
"buildTarget": "interview-prep:build:local"
77107
}
78108
},
79-
"defaultConfiguration": "development"
109+
"defaultConfiguration": "local"
80110
},
81111
"extract-i18n": {
82112
"builder": "@angular-devkit/build-angular:extract-i18n"

frontend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve --host 0.0.0.0 --port 4200",
7-
"build": "ng build",
8-
"watch": "ng build --watch --configuration development",
7+
"build": "ng build --configuration production",
8+
"watch": "ng build --watch --configuration local",
99
"test": "ng test --no-watch",
1010
"test:watch": "ng test"
1111
},
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const environment = {
2+
production: true,
3+
apiBaseUrl: 'https://api.dev.interviewprep.onyxdevtutorials.com/api/v0',
4+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const environment = {
2+
production: false,
3+
apiBaseUrl: 'http://localhost:3000/api/v0',
4+
};
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
export const environment = {
22
production: true,
3-
apiBaseUrl: 'https://api.dev.interviewprep.onyxdevtutorials.com/api/v0',
3+
apiBaseUrl: 'https://api.prod.interviewprep.onyxdevtutorials.com/api/v0',
44
};
5-
// export const environment = {
6-
// production: true,
7-
// apiBaseUrl: 'http://backend:3000/api/v0',
8-
// };

0 commit comments

Comments
 (0)