Skip to content

Commit

Permalink
Development: Update to Angular 16 and speedup the build process (ls1i…
Browse files Browse the repository at this point in the history
  • Loading branch information
pal03377 authored May 23, 2023
1 parent 6eeae8d commit 9e1e420
Show file tree
Hide file tree
Showing 53 changed files with 5,096 additions and 5,648 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ docker/
src/main/generated/
src/main/resources/
uploads/
webpack/
target/
node/
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projects/**/*"
],
"parserOptions": {
"project": ["./tsconfig.json", "./tsconfig.app.json", "./tsconfig.spec.json", "./tsconfig.webpack.json", "src/test/cypress/tsconfig.json"]
"project": ["./tsconfig.json", "./tsconfig.app.json", "./tsconfig.spec.json", "src/test/cypress/tsconfig.json"]
},
"extends": [
"plugin:prettier/recommended"
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ repos-download/
/src/test/cypress/videos/
/src/test/cypress/build

#################################
# Files generated by prebuild.mjs
#################################
/src/main/webapp/app/environments/environment.*.ts
/src/main/webapp/i18n/*.json

######################
# Artemis configs
######################
Expand Down
32 changes: 24 additions & 8 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
"prefix": "jhi",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"builder": "@angular-devkit/build-angular:browser",
"options": {
"customWebpackConfig": {
"path": "./webpack/webpack.custom.js"
},
"allowedCommonJsDependencies": [
"sockjs-client",
"hoist-non-react-statics",
Expand Down Expand Up @@ -59,6 +56,11 @@
"polyfills": "src/main/webapp/app/polyfills.ts",
"tsConfig": "tsconfig.json",
"inlineStyleLanguage": "scss",
"stylePreprocessorOptions": {
"includePaths": [
"."
]
},
"assets": [
"src/main/webapp/content",
"src/main/webapp/logo/favicon.svg",
Expand All @@ -77,6 +79,7 @@
"src/main/webapp/logo/mstile-310x150.png",
"src/main/webapp/logo/mstile-310x310.png",
"src/main/webapp/logo/safari-pinned-tab.svg",
"src/main/webapp/i18n",
{
"glob": "*.{js,css,html,png}",
"input": "./node_modules/swagger-ui-dist",
Expand Down Expand Up @@ -123,7 +126,7 @@
"hidden": false,
"vendor": false
},
"namedChunks": false,
"namedChunks": true,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
Expand All @@ -141,6 +144,12 @@
"maximumWarning": "1mb",
"maximumError": "1.6mb"
}
],
"fileReplacements": [
{
"replace": "src/main/webapp/app/environments/environment.ts",
"with": "src/main/webapp/app/environments/environment.override.ts"
}
]
},
"development": {
Expand All @@ -149,16 +158,23 @@
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
"namedChunks": true,
"fileReplacements": [
{
"replace": "src/main/webapp/app/environments/environment.ts",
"with": "src/main/webapp/app/environments/environment.override.ts"
}
]
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "artemis:build:development",
"port": 4200
"proxyConfig": "proxy.conf.mjs",
"port": 9000
},
"configurations": {
"production": {
Expand Down
7 changes: 3 additions & 4 deletions docs/dev/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Artemis. Artemis is based on `JHipster <https://jhipster.github.io>`__,
i.e. \ `Spring Boot <http://projects.spring.io/spring-boot>`__
development on the application server using Java 17, and TypeScript
development on the application client in the browser using
`Angular <https://angular.io>`__ and Webpack. To get an overview of the
`Angular <https://angular.io>`__. To get an overview of the
used technology, have a look at the `JHipster Technology stack <https://jhipster.github.io/tech-stack>`__
and other tutorials on the JHipster homepage.

Expand Down Expand Up @@ -527,9 +527,8 @@ command:

npm run serve

This compiles TypeScript code to JavaScript code, starts the hot module
replacement feature in Webpack (i.e. whenever you change a TypeScript
file and save, the client is automatically reloaded with the new code)
This compiles TypeScript code to JavaScript code, starts the live reloading feature
(i.e. whenever you change a TypeScript file and save, the client is automatically reloaded with the new code)
and will start the client application in your browser on
``http://localhost:9000``. If you have activated the JIRA profile (see
above in `Server Setup <#server-setup>`__) and if you have configured
Expand Down
3 changes: 0 additions & 3 deletions gradle/profile_dev.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ task webapp(type: NpmTask) {
inputs.files("tsconfig.json", "tsconfig.app.json")
.withPropertyName("tsconfig")
.withPathSensitivity(PathSensitivity.RELATIVE)
inputs.dir("webpack/")
.withPropertyName("webpack/")
.withPathSensitivity(PathSensitivity.RELATIVE)
inputs.dir("src/main/webapp/")
.withPropertyName("webapp-source-dir")
.withPathSensitivity(PathSensitivity.RELATIVE)
Expand Down
2 changes: 0 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ const esModules = ['lodash-es', 'franc-min', 'trigram-utils', 'n-gram', 'collaps
const {
compilerOptions: { baseUrl = './' },
} = require('./tsconfig.json');
const environment = require('./webpack/environment');

module.exports = {
globalSetup: 'jest-preset-angular/global-setup',
globals: {
...environment,
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.html$',
Expand Down
Loading

0 comments on commit 9e1e420

Please sign in to comment.