Skip to content

Commit

Permalink
Merge pull request #1046 from ORCID/feature/change-base-href-and-othe…
Browse files Browse the repository at this point in the history
…r-paths-for-ui

Feature/change base href and other paths for UI
  • Loading branch information
jthomas-orcid authored Oct 30, 2023
2 parents 315a626 + 877b6f6 commit 9686ea8
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
12 changes: 6 additions & 6 deletions ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"gateway": {
"ui": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
Expand All @@ -17,7 +17,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/gateway",
"outputPath": "dist/ui",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
Expand Down Expand Up @@ -63,23 +63,23 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "gateway:build",
"browserTarget": "ui:build",
"proxyConfig": "src/proxy.conf.json"
},
"configurations": {
"production": {
"browserTarget": "gateway:build:production"
"browserTarget": "ui:build:production"
},
"development": {
"browserTarget": "gateway:build:development"
"browserTarget": "ui:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "gateway:build"
"browserTarget": "ui:build"
}
},
"test": {
Expand Down
9 changes: 6 additions & 3 deletions ui/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ module.exports = function (config) {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require("path").join(__dirname, "./coverage/gateway"),
subdir: ".",
reporters: [{ type: "html" }, { type: "text-summary" }],
dir: require('path').join(__dirname, './coverage/ui'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ["progress", "kjhtml"],
port: 9876,
Expand Down
4 changes: 2 additions & 2 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ui/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "gateway",
"name": "ui",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --disable-host-check --host 0.0.0.0",
"start_ssl": "ng serve --disable-host-check --host 0.0.0.0 --ssl",
"build": "ng build --base-href ./",
"watch": "ng build --base-href ./ --watch --configuration development",
"build": "ng build --base-href='/ui/'",
"watch": "ng build --base-href='/ui/' --watch --configuration development",
"test": "ng test",
"lint": "ng lint",
"format:cli": "ng lint && npx prettier .",
Expand Down
13 changes: 7 additions & 6 deletions ui/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ describe('AppComponent', () => {
expect(app).toBeTruthy()
})

it(`should have as title 'gateway'`, () => {
const fixture = TestBed.createComponent(AppComponent)
const app = fixture.componentInstance
expect(app.title).toEqual('gateway')
})
})
it(`should have as title 'ui'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('ui');
});

});
3 changes: 1 addition & 2 deletions ui/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { HttpClient } from '@angular/common/http'
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
title = 'gateway'

title = 'ui';
constructor(private http: HttpClient) {}
}

0 comments on commit 9686ea8

Please sign in to comment.