diff --git a/angular.json b/angular.json index ab0275f..54d6cf3 100644 --- a/angular.json +++ b/angular.json @@ -15,20 +15,15 @@ "prefix": "app", "architect": { "build": { - "builder": "@angular-devkit/build-angular:application", + "builder": "@angular-devkit/build-angular:browser", "options": { - "outputPath": "dist/aconnect-ux", + "outputPath": "dist/aconnect-ux/browser", "index": "src/index.html", - "browser": "src/main.ts", - "polyfills": [ - "zone.js" - ], + "main": "src/main.ts", + "polyfills": ["zone.js"], "tsConfig": "tsconfig.app.json", "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], + "assets": ["src/favicon.ico", "src/assets"], "styles": [ "src/styles.scss", "node_modules/@ng-select/ng-select/themes/default.theme.css", @@ -38,26 +33,13 @@ "src/assets/css/icons.min.css", "src/assets/css/app.min.css" ], - "scripts": [], - "server": "src/main.server.ts", - "outputMode": "server", - "ssr": { - "entry": "src/server.ts" - } + "scripts": [] }, "configurations": { "production": { "budgets": [ - { - "type": "initial", - "maximumWarning": "500kB", - "maximumError": "1MB" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "4kB", - "maximumError": "8kB" - } + { "type": "initial", "maximumWarning": "500kB", "maximumError": "1MB" }, + { "type": "anyComponentStyle", "maximumWarning": "4kB", "maximumError": "8kB" } ], "outputHashing": "all", "fileReplacements": [ @@ -70,44 +52,86 @@ "development": { "optimization": false, "extractLicenses": false, - "sourceMap": true + "sourceMap": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.dev.ts" + } + ] + }, + "test": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.test.ts" + } + ] } }, "defaultConfiguration": "production" }, + "serve": { "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { "buildTarget": "ACONNECT-UX:build:production" }, + "development": { "buildTarget": "ACONNECT-UX:build:development" }, + "test": { "buildTarget": "ACONNECT-UX:build:test" } + }, + "defaultConfiguration": "development" + }, + + "server": { + "builder": "@angular-devkit/build-angular:server", + "options": { + "outputPath": "dist/aconnect-ux/server", + "main": "src/main.server.ts", + "tsConfig": "tsconfig.server.json" + }, "configurations": { "production": { - "buildTarget": "ACONNECT-UX:build:production" + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ] }, "development": { - "buildTarget": "ACONNECT-UX:build:development" + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.dev.ts" + } + ] + }, + "test": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.test.ts" + } + ] } - }, - "defaultConfiguration": "development" + } }, + "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n" }, + "test": { "builder": "@angular-devkit/build-angular:karma", "options": { - "polyfills": [ - "zone.js", - "zone.js/testing" - ], + "polyfills": ["zone.js", "zone.js/testing"], "tsConfig": "tsconfig.spec.json", "inlineStyleLanguage": "scss", - "assets": [ - { - "glob": "**/*", - "input": "public" - } - ], - "styles": [ - "src/styles.scss" - ], + "assets": [{ "glob": "**/*", "input": "public" }], + "styles": ["src/styles.scss"], "scripts": [] } } diff --git a/package.json b/package.json index e6e48a5..ae6d01f 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,18 @@ "version": "0.0.0", "scripts": { "ng": "ng", - "start": "ng serve", - "build": "ng build", + "start": "ng serve --configuration=development", + "start:dev": "ng serve --configuration=development", + "start:test": "ng serve --configuration=test", + "start:prod": "ng serve --configuration=production", + "build": "ng build --configuration=development", + "build:dev": "ng build --configuration=development", + "build:test": "ng build --configuration=test", "build:prod": "ng build --configuration=production", - "watch": "ng build --watch --configuration development", + "watch:dev": "ng build --watch --configuration=development", + "watch:test": "ng build --watch --configuration=test", "test": "ng test", - "serve:ssr:ACONNECT-UX": "node dist/aconnect-ux/server/server.mjs" + "serve:ssr": "node dist/aconnect-ux/server/main.js" }, "private": true, "dependencies": { diff --git a/src/environments/environment.dev.ts b/src/environments/environment.dev.ts new file mode 100644 index 0000000..22d8e44 --- /dev/null +++ b/src/environments/environment.dev.ts @@ -0,0 +1,10 @@ +export const environment = { + production: true, + versionNumber: '1.0.0.0', + buildNumber: '1.0', + buildDate: '08-01-2026', + enableEncryption: true, + moduleHost: new Map([ + ["ACONNECT_DOMAIN_URI", "https://api.redmetic.com"] + ]) +}; diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 758cb57..90e3a98 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -5,6 +5,6 @@ export const environment = { buildDate: '27-11-2025', enableEncryption: true, moduleHost: new Map([ - ["ACONNECT_DOMAIN_URI", "http://localhost:8080"] + ["ACONNECT_DOMAIN_URI", "https://api.aconnect.com"] ]) }; diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts new file mode 100644 index 0000000..0289fb7 --- /dev/null +++ b/src/environments/environment.test.ts @@ -0,0 +1,10 @@ +export const environment = { + production: false, + versionNumber: '1.0.0.0', + buildNumber: '1.0', + buildDate: '08-01-2026', + enableEncryption: true, + moduleHost: new Map([ + ["ACONNECT_DOMAIN_URI", "https://test.api.redmetic.com"] + ]) +};