Skip to content

Commit 9e36793

Browse files
authored
Merge pull request #57 from Zapper9982/bugfix/issue-51
fix: Made necessary changes for build to pass
2 parents fde9f47 + 40201b0 commit 9e36793

File tree

9 files changed

+58
-118
lines changed

9 files changed

+58
-118
lines changed

.eslintrc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@typescript-eslint/no-explicit-any": 0,
3636
"@typescript-eslint/no-empty-function": 0,
3737
"@typescript-eslint/no-unused-vars": 0,
38+
"@angular-eslint/template/click-events-have-key-events": 0,
3839
"eqeqeq": 1
3940
}
4041
},
@@ -55,6 +56,22 @@
5556
}
5657
]
5758
}
59+
},
60+
{
61+
"files": ["*.js", "*.jsx"],
62+
"env": {
63+
"node": true
64+
},
65+
"extends": ["eslint:recommended"],
66+
"parserOptions": {
67+
"ecmaVersion": 2020,
68+
"sourceType": "module"
69+
},
70+
"rules": {
71+
"no-unused-vars": "warn",
72+
"no-console": "error",
73+
"eqeqeq": ["error", "always"]
74+
}
5875
}
5976
]
6077
}

.github/workflows/build-on-pull-request.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212
with:
1313
ref: ${{ github.event.pull_request.head.ref }}
1414
repository: ${{ github.event.pull_request.head.repo.full_name }}
@@ -19,13 +19,13 @@ jobs:
1919
run: git submodule update --init --recursive
2020

2121
- name: Setup JDK 17
22-
uses: actions/setup-java@v2
22+
uses: actions/setup-java@v4
2323
with:
2424
java-version: 17
2525
distribution: 'adopt'
2626

2727
- name: Set up Node.js
28-
uses: actions/setup-node@v2
28+
uses: actions/setup-node@v4
2929
with:
3030
node-version: 18
3131

@@ -34,8 +34,6 @@ jobs:
3434
npm config set legacy-peer-deps true
3535
npm install -g @angular/cli
3636
npm install [email protected] --save-dev
37-
npm install [email protected]
38-
npm install node-sass
3937
npm install --force
40-
npm run build
38+
npm run build-ci
4139

.github/workflows/package-prod.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/package.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717

1818
- name: Checkout code
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
with:
2121
submodules: true # Include submodules
2222
fetch-depth: 0 # Ensure the full history is fetched
@@ -25,13 +25,13 @@ jobs:
2525
run: git submodule update --init --recursive
2626

2727
- name: Set up Java
28-
uses: actions/setup-java@v3
28+
uses: actions/setup-java@v4
2929
with:
3030
java-version: '17'
3131
distribution: 'adopt'
3232

3333
- name: Set up Node.js
34-
uses: actions/setup-node@v2
34+
uses: actions/setup-node@v4
3535
with:
3636
node-version: 18
3737

@@ -40,16 +40,14 @@ jobs:
4040
npm config set legacy-peer-deps true
4141
npm install -g @angular/cli
4242
npm install [email protected] --save-dev
43-
npm install [email protected]
44-
npm install node-sass
4543
npm install --force
46-
npm run build
44+
npm run build-ci
4745
4846
- name: Create WAR file
4947
run: jar -cvf tm-ui.war -C dist .
5048

5149
- name: Upload WAR file as artifact
52-
uses: actions/upload-artifact@v2
50+
uses: actions/upload-artifact@v4
5351
with:
5452
name: TM-UI
55-
path: tm-ui.war
53+
path: dist/tm-ui/tm-ui.war

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ testem.log
4343
Thumbs.db
4444

4545
/src/environments/environment.ts
46+
/src/environments/environment.ci.ts

angular.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@
5050
}
5151
],
5252
"outputHashing": "all",
53-
"optimization": true
53+
"optimization": true,
54+
"fileReplacements": [
55+
{
56+
"replace": "src/environments/environment.ts",
57+
"with": "src/environments/environment.prod.ts"
58+
}
59+
]
5460
},
5561
"development": {
5662
"buildOptimizer": false,

package-lock.json

Lines changed: 17 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"lint": "ng lint",
1111
"lint:fix": "ng lint --fix",
1212
"prepare": "husky install",
13-
"build-dev": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=development --aot",
14-
"build-prod": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=production --aot",
15-
"build-ci": "chmod +x ./scripts/*.js && ./scripts/ci-prebuild.js && node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=ci --aot",
16-
"build-test": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=test --aot"
13+
"build-dev": "(test -f src/environments/environment.ts || touch src/environments/environment.ts) && node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=development --aot",
14+
"build-prod": "(test -f src/environments/environment.ts || touch src/environments/environment.ts) && node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=production --aot",
15+
"build-ci": "(test -f src/environments/environment.ts || touch src/environments/environment.ts) && chmod +x ./scripts/*.js && ./scripts/ci-prebuild.js && node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=ci --aot",
16+
"build-test": "(test -f src/environments/environment.ts || touch src/environments/environment.ts) && node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=test --aot"
1717
},
1818
"lint-staged": {
1919
"src/**/*.{ts,html}": [

0 commit comments

Comments
 (0)