Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/upadte angular18 #226

Merged
merged 22 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"plugins": [
"@angular-eslint/eslint-plugin",
"@typescript-eslint"
"@typescript-eslint",
"@stylistic"
],
"rules": {
"@angular-eslint/component-class-suffix": "error",
Expand Down Expand Up @@ -49,7 +50,7 @@
"accessibility": "explicit"
}
],
"@typescript-eslint/member-delimiter-style": [
"@stylistic/member-delimiter-style": [
"error",
{
"multiline": {
Expand Down Expand Up @@ -88,18 +89,18 @@
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/quotes": [
"@stylistic/quotes": [
2,
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"@typescript-eslint/semi": [
"@stylistic/semi": [
"error"
],
"@typescript-eslint/type-annotation-spacing": "error",
"@stylistic/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"arrow-body-style": "error",
"brace-style": [
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
steps:
- uses: actions/[email protected]

- name: Use Node 16
- name: Use Node 18
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Cache node modules
id: cache-nodemodules
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
### STAGE 1: Build ###

# We label our stage as 'hub'
FROM node:16.19.0 as hub
FROM node:18.20.5 AS hub

COPY package.json package-lock.json ./

## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN export NODE_OPTIONS=--max_old_space_size=8192 && npm install && mkdir /ng-app && cp -R ./node_modules ./ng-app
RUN npm i --ignore-scripts && npm run postinstall && mkdir /ng-app && cp -R ./node_modules ./ng-app

COPY ./scripts/start.sh ./ng-app

Expand All @@ -15,7 +15,7 @@ WORKDIR /ng-app
COPY . .

## Build the angular app in production mode and store the artifacts in dist folder
RUN export NODE_OPTIONS=--max_old_space_size=8192 && $(npm bin)/ng build --configuration production --aot --base-href='$ARLAS_HUB_BASE_HREF/'
RUN npm run build

### STAGE 2: Setup ###

Expand Down
31 changes: 16 additions & 15 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist",
"outputPath": {
"base": "dist",
"browser": ""
},
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"polyfills": [
"src/polyfills.ts"
],
"assets": [
"src/assets",
"src/settings.yaml",
Expand All @@ -32,7 +36,8 @@
"src/styles/theme.scss",
"src/styles.scss"
],
"scripts": []
"scripts": [],
"browser": "src/main.ts"
},
"configurations": {
"development": {
Expand All @@ -41,8 +46,6 @@
"sourceMap": true,
"namedChunks": true,
"extractLicenses": false,
"vendorChunk": true,
"buildOptimizer": false,
"budgets": []
},
"production": {
Expand All @@ -52,12 +55,10 @@
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.prod.ts"
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"assets": [
Expand All @@ -77,22 +78,22 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "arlas-home:build"
"buildTarget": "arlas-home:build"
},
"configurations": {
"development": {
"browserTarget": "arlas-home:build:development"
"buildTarget": "arlas-home:build:development"
},
"production": {
"browserTarget": "arlas-home:build:production"
"buildTarget": "arlas-home:build:production"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "arlas-home:build"
"buildTarget": "arlas-home:build"
}
},
"test": {
Expand Down
2 changes: 1 addition & 1 deletion e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"baseUrl": "./",
"baseUrl": "src",
"module": "commonjs",
"target": "es5",
"types": [
Expand Down
Loading
Loading