Skip to content

Commit

Permalink
build(app): update to Angular v18
Browse files Browse the repository at this point in the history
  • Loading branch information
musicEnfanthen committed May 27, 2024
1 parent fe2595c commit 3287831
Show file tree
Hide file tree
Showing 5 changed files with 1,694 additions and 1,552 deletions.
20 changes: 9 additions & 11 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,23 @@
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/awg-website",
"outputPath": {
"base": "dist/awg-website"
},
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"src/polyfills.ts"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"localize": true,
"aot": true,
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"scripts": []
"scripts": [],
"browser": "src/main.ts"
},
"configurations": {
"production": {
Expand All @@ -50,8 +54,6 @@
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
Expand All @@ -67,9 +69,7 @@
},
"development": {
"fileReplacements": [],
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true,
Expand All @@ -89,9 +89,7 @@
},
"en": {
"fileReplacements": [],
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true,
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,50 +50,50 @@
"format-files:check": "prettier --check \"src/**/*.{ts,js,html,css,scss}\"",
"format-files:fix": "prettier --write \"src/**/*.{ts,js,html,css,scss}\"",
"-- DOCS --": "",
"doc": "yarn compodoc --tsconfig tsconfig.doc.json --theme Readthedocs --output dist/awg-website/compodoc",
"doc": "yarn compodoc --tsconfig tsconfig.doc.json --theme Readthedocs --output dist/awg-website/browser/compodoc",
"doc:build": "yarn doc",
"doc:serve": "yarn doc --serve --watch",
"-- BUILD --": "",
"build:prod": "ng build",
"build:prod:serve": "yarn build:prod && http-server -c-1 -o -p 9875 ./dist/awg-website",
"build:prod:serve": "yarn build:prod && http-server -c-1 -o -p 9875 ./dist/awg-website/browser",
"build:watch": "ng build --watch --configuration development",
"build:gh": "yarn build:prod --base-href $npm_package_homepage && yarn compress:dist && yarn doc:build",
"compress:dist": "gzipper compress ./dist/awg-website/ --gzip --brotli",
"-- ANALYZE --": "",
"pre_wpanalyzer": "yarn build:prod --stats-json",
"wpanalyzer": "yarn pre_wpanalyzer && webpack-bundle-analyzer dist/awg-website/stats.json",
"pre_sourcemap": "yarn build:prod --sourceMap",
"pre_sourcemap": "yarn build:prod --source-map",
"sourcemap": "yarn pre_sourcemap && source-map-explorer dist/awg-website/*.js",
"-- DEPLOY --": "",
"pre-release": "commit-and-tag-version -a",
"deploy:ci": "ng deploy --no-build --message=\"Release $npm_package_name (v$npm_package_version) on gh-pages\""
},
"dependencies": {
"@angular/animations": "^17.3.9",
"@angular/animations": "^18.0.0",
"@angular/cdk": "^17.3.9",
"@angular/common": "^17.3.9",
"@angular/compiler": "^17.3.9",
"@angular/core": "^17.3.9",
"@angular/forms": "^17.3.9",
"@angular/localize": "^17.3.9",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/localize": "^18.0.0",
"@angular/material": "^17.3.9",
"@angular/platform-browser": "^17.3.9",
"@angular/platform-browser-dynamic": "^17.3.9",
"@angular/router": "^17.3.9",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/router": "^18.0.0",
"rxjs": "~7.8.1",
"tslib": "^2.6.1",
"zone.js": "~0.14.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.7",
"@angular-devkit/build-angular": "^18.0.1",
"@angular-eslint/builder": "^17.4.1",
"@angular-eslint/eslint-plugin": "^17.4.1",
"@angular-eslint/eslint-plugin-template": "^17.4.1",
"@angular-eslint/schematics": "^17.4.1",
"@angular-eslint/template-parser": "^17.4.1",
"@angular/cli": "^17.3.7",
"@angular/compiler-cli": "^17.3.9",
"@angular/language-service": "^17.3.9",
"@angular/cli": "^18.0.1",
"@angular/compiler-cli": "^18.0.0",
"@angular/language-service": "^18.0.0",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-angular": "^19.3.0",
"@compodoc/compodoc": "^1.1.24",
Expand Down Expand Up @@ -121,7 +121,7 @@
"lint-staged": "^15.2.4",
"prettier": "^3.2.5",
"source-map-explorer": "^2.5.3",
"typescript": "~5.2.2",
"typescript": "~5.4.5",
"webpack-bundle-analyzer": "^4.10.2"
},
"engines": {
Expand Down
15 changes: 7 additions & 8 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { registerLocaleData } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import localeDeDE from '@angular/common/locales/de';
import { LOCALE_ID, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
Expand All @@ -23,24 +23,23 @@ registerLocaleData(localeDeDE);

@NgModule({
declarations: [AppComponent, routedComponents],
bootstrap: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
HttpClientModule,

SharedModule,

CoreModule,
ContactModule,
EditionModule,
ProjectModule,
ResearchModule,
WebernModule,
WorksModule,

AppRoutingModule, // Has to be last routed Module
AppRoutingModule,
],
providers: [
{ provide: LOCALE_ID, useValue: 'de-DE' }, // Change global LOCALE-ID
provideHttpClient(withInterceptorsFromDi()),
],
providers: [{ provide: LOCALE_ID, useValue: 'de-DE' }], // Change global LOCALE-ID
bootstrap: [AppComponent],
})
export class AppModule {}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"baseUrl": "./src",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
Expand Down
Loading

0 comments on commit 3287831

Please sign in to comment.