Skip to content

Commit

Permalink
chore(client): Update to files generated by Angular 18 CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
mugifly committed Jun 6, 2024
1 parent 7bd7ed5 commit eed9d8d
Show file tree
Hide file tree
Showing 13 changed files with 149 additions and 210 deletions.
4 changes: 2 additions & 2 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Client

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.3.2.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.3.

## Development server

Expand All @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To u

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
34 changes: 13 additions & 21 deletions client/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
Expand All @@ -24,7 +21,8 @@
"base": "dist"
},
"index": "src/index.html",
"polyfills": ["src/polyfills.ts"],
"browser": "src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
Expand All @@ -34,8 +32,7 @@
}
],
"styles": ["src/styles.scss"],
"scripts": [],
"browser": "src/main.ts"
"scripts": []
},
"configurations": {
"production": {
Expand All @@ -51,19 +48,18 @@
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.development.ts"
}
]
}
},
"defaultConfiguration": "production"
Expand All @@ -81,18 +77,13 @@
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "client:build"
}
"builder": "@angular-devkit/build-angular:extract-i18n"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": [
{
Expand All @@ -101,7 +92,8 @@
}
],
"styles": ["src/styles.scss"],
"scripts": []
"scripts": [],
"karmaConfig": "karma.conf.js"
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions client/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ module.exports = function (config) {
reporters: [{ type: 'html' }, { type: 'text-summary' }],
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
});
};
17 changes: 8 additions & 9 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@
"devDependencies": {
"@angular-devkit/build-angular": "^18.0.3",
"@angular/cli": "^18.0.3",
"@angular/compiler-cli": "^18.0.2",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"jasmine-core": "~4.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"@angular/compiler-cli": "^18.0.0",
"@types/jasmine": "~5.1.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"karma-junit-reporter": "^2.0.1",
"typescript": "^5.4.5"
}
Expand Down
2 changes: 2 additions & 0 deletions client/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { environment } from 'src/environments/environment';

@Component({
selector: 'app-root',
Expand All @@ -10,4 +11,5 @@ import { RouterOutlet } from '@angular/router';
})
export class AppComponent {
title = 'client';
isProduction = environment.production;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const environment = {
production: true,
production: false,
};
15 changes: 1 addition & 14 deletions client/src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false,
production: true,
};

/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
7 changes: 1 addition & 6 deletions client/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import { enableProdMode, importProvidersFrom } from '@angular/core';
import { importProvidersFrom } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { provideRouter } from '@angular/router';
import {
provideHttpClient,
withInterceptorsFromDi,
} from '@angular/common/http';
import { environment } from './environments/environment';
import { routes } from './app/app.routes';
import { AppComponent } from './app/app.component';
import { ApiModule } from 'src/.api-client/api.module';

if (environment.production) {
enableProdMode();
}

bootstrapApplication(AppComponent, {
providers: [
importProvidersFrom(
Expand Down
52 changes: 0 additions & 52 deletions client/src/polyfills.ts

This file was deleted.

5 changes: 3 additions & 2 deletions client/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": ["src/main.ts", "src/polyfills.ts"],
"files": ["src/main.ts"],
"include": ["src/**/*.d.ts"]
}
18 changes: 8 additions & 10 deletions client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"esModuleInterop": true,
"sourceMap": true,
"declaration": false,
"experimentalDecorators": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"importHelpers": true,
"target": "ES2022",
"module": "es2020",
"lib": [
"es2020",
"dom"
],
"useDefineForClassFields": false
"module": "ES2022",
"useDefineForClassFields": false,
"lib": ["ES2022", "dom"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
4 changes: 2 additions & 2 deletions client/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": ["jasmine"]
},
"files": ["src/test.ts", "src/polyfills.ts"],
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
}
Loading

0 comments on commit eed9d8d

Please sign in to comment.