Skip to content

Commit

Permalink
chore: update frontend to Angular v14 and Node v18 (LTS)
Browse files Browse the repository at this point in the history
* chore: updated to Angular version 12 and Node version 16 (LTS)

* fix: updated to Angular version 14, fixed dependency conflicts, updated Dockerfile

* chore: removed yarn.lock

* chore: updated to Angular version 12 and Node version 16 (LTS)

* fix: updated to Angular version 14, fixed dependency conflicts, updated Dockerfile

* chore: removed yarn.lock

* fix: updated angular.json with a working configuration for conditional styles, updated angular to v14

the styles were moved to the assets folder for better consistency

* ci: attempt at fixing build automation

* ci: attempt at fixing build automation

* ci: attempt at fixing build automation

* ci: updated test gradle version to match local

* fix: dockerfile configuration environment variable

---------

Co-authored-by: ewout <[email protected]>
  • Loading branch information
EwoutV and EwoutV authored Feb 28, 2023
1 parent 978d181 commit bd2808a
Show file tree
Hide file tree
Showing 94 changed files with 19,310 additions and 52,503 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: gradle:jdk8
image: gradle:6.4.1-jdk
env:
SPRING_PROFILES_ACTIVE: test,ci

Expand Down
3 changes: 1 addition & 2 deletions backend/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
* This file was generated by the Gradle 'init' task.
*/

rootProject.name = 'BlokAtUGent'
rootProject.name = 'BlokAtUGent'
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ speed-measure-plugin*.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
13 changes: 7 additions & 6 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
### STAGE 1: Build ###
FROM node:18.14.0-alpine AS build

FROM node:14.21-alpine AS build
WORKDIR /app
RUN npm install -g @angular/cli

COPY package.json package-lock.json ./
RUN npm install

RUN npm install -g @angular/cli@^14.0.0
RUN npm install --legacy-peer-deps

COPY . .

ARG configuration=production

RUN ng build --configuration=${configuration}

RUN echo ${configuration}

### STAGE 2: Run ###

FROM nginx:1.17.1-alpine

COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/dist/frontend /usr/share/nginx/html
67 changes: 32 additions & 35 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
}
},
"root": "",
"sourceRoot": "src",
Expand All @@ -22,7 +22,6 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets",
Expand All @@ -38,35 +37,35 @@
"output": "./assets/"
}
],
"styles": [
"src/styles.scss",
"src/development.scss"
],
"scripts": [
],
"stylePreprocessorOptions": {
"includePaths": [
"node_modules/breakpoint-sass/stylesheets",
"node_modules/susy/sass"
]
}
"styles": [
"src/assets/styles/local/styles.scss"
],
"stylePreprocessorOptions": {
"includePaths": [
"node_modules/breakpoint-sass/stylesheets",
"node_modules/susy/sass"
]
},
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
},
{
"replace": "src/development.scss",
"with": "src/extra-styling-placeholder.scss"
"with": "src/environments/environment.production.ts"
}
],
"styles": [
"src/assets/styles/production/styles.scss"
],
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
Expand All @@ -88,17 +87,15 @@
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.local-prod.ts"
},
{
"replace": "src/development.scss",
"with": "src/extra-styling-placeholder.scss"
"with": "src/environments/environment.local-production.ts"
}
],
"styles": [
"src/assets/styles/production/styles.scss"
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
Expand All @@ -120,13 +117,14 @@
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.stag.ts"
"with": "src/environments/environment.staging.ts"
}
],
"styles": [
"src/assets/styles/staging/styles.scss"
],
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
Expand All @@ -153,11 +151,11 @@
"proxyConfig": "proxy.conf.json"
},
"configurations": {
"production": {
"browserTarget": "frontend:build:production"
"local-production": {
"browserTarget": "frontend:build:local-production"
}
}
},
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
Expand Down Expand Up @@ -215,8 +213,7 @@
}
}
}
},
"defaultProject": "frontend",
},
"cli": {
"analytics": false
}
Expand Down
Loading

0 comments on commit bd2808a

Please sign in to comment.