Skip to content

Commit 3f2fe61

Browse files
committed
adding support for timetracker pointing to v2
1 parent 4ed4c68 commit 3f2fe61

File tree

4 files changed

+62
-1
lines changed

4 files changed

+62
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN API_URL=${API_URL} \
2626
SCOPES=${SCOPES} \
2727
AZURE_APP_CONFIGURATION_CONNECTION_STRING=${AZURE_APP_CONFIGURATION_CONNECTION_STRING}
2828

29-
RUN npm run build
29+
RUN npm run build-v2
3030

3131
FROM nginx:1.21 AS production
3232

angular.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,34 @@
7878
"maximumError": "10kb"
7979
}
8080
]
81+
},
82+
"production-v2": {
83+
"fileReplacements": [
84+
{
85+
"replace": "src/environments/environment.ts",
86+
"with": "src/environments/environment.prod_v2.ts"
87+
}
88+
],
89+
"optimization": true,
90+
"outputHashing": "all",
91+
"sourceMap": false,
92+
"extractCss": true,
93+
"namedChunks": false,
94+
"extractLicenses": true,
95+
"vendorChunk": false,
96+
"buildOptimizer": true,
97+
"budgets": [
98+
{
99+
"type": "initial",
100+
"maximumWarning": "2mb",
101+
"maximumError": "5mb"
102+
},
103+
{
104+
"type": "anyComponentStyle",
105+
"maximumWarning": "6kb",
106+
"maximumError": "10kb"
107+
}
108+
]
81109
}
82110
}
83111
},

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"ng": "ng",
77
"start": "ng serve",
88
"build": "ng build --prod",
9+
"build-v2": "ng build --configuration=production-v2",
910
"test": "ng test --browsers ChromeHeadless",
1011
"test-headless": "ng test --browsers ChromeHeadless",
1112
"ci-test": "ng test --no-watch --no-progress --browsers ChromeHeadless",
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
export const environment = {
3+
production: false, //this triggers build angular using google auth only not azure
4+
timeTrackerApiUrl: process.env["API_URL"],
5+
stackexchangeApiUrl: 'https://api.stackexchange.com',
6+
};
7+
8+
export const AUTHORITY = process.env["AUTHORITY"]; //must be removed once tt-live is down
9+
export const CLIENT_ID = process.env["CLIENT_ID"];
10+
export const CLIENT_URL = process.env["CLIENT_URL"];
11+
export const SCOPES = process.env["SCOPES"].split(",");
12+
export const ITEMS_PER_PAGE = 5;
13+
export const STACK_EXCHANGE_ID = process.env["STACK_EXCHANGE_ID"];
14+
export const STACK_EXCHANGE_ACCESS_TOKEN = process.env["STACK_EXCHANGE_ACCESS_TOKEN"];
15+
export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = process.env["AZURE_APP_CONFIGURATION_CONNECTION_STRING"]; //must be removed once tt-live is down
16+
export const DATE_FORMAT = 'yyyy-MM-dd';
17+
export const DATE_FORMAT_YEAR = 'YYYY-MM-DD';
18+
export const GROUPS = {
19+
ADMIN: 'time-tracker-admin',
20+
TESTER: 'time-tracker-tester',
21+
};
22+
23+
export const ROLES = {
24+
admin: {
25+
name: 'admin',
26+
value: 'time-tracker-admin',
27+
},
28+
tester: {
29+
name: 'test',
30+
value: 'time-tracker-tester',
31+
},
32+
};

0 commit comments

Comments
 (0)