Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

Commit

Permalink
Move styling to the lib and remove unncessary files
Browse files Browse the repository at this point in the history
  • Loading branch information
taleb committed Feb 6, 2019
1 parent e4d8047 commit a3c6628
Show file tree
Hide file tree
Showing 228 changed files with 90 additions and 14,724 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ This is an angular library that provides components to view and annotate PDF doc
- and styles
```
"styles": [
"node_modules/@hmcts/annotation-ui-lib/assets/annotation-ui-theme.scss",
"node_modules/@hmcts/annotation-ui-lib/assets/aui-styles.scss",
...
],
```
- import JS dependencies as scripts within angular.json
```
"scripts": [
"node_modules/@hmcts/annotation-ui-lib/assets/js/pdf.min.js",
"node_modules/@hmcts/annotation-ui-lib/assets/js/pdf.worker.min.js",
"node_modules/@hmcts/annotation-ui-lib/assets/js/pdf.combined.min.js",
"node_modules/@hmcts/annotation-ui-lib/assets/js/pdf_viewer.min.js",
"node_modules/@hmcts/annotation-ui-lib/assets/js/pdf-annotate.min.js"
...
Expand Down
28 changes: 1 addition & 27 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,40 +74,14 @@
"input": "dist/annotation-ui-lib/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "projects/annotation-ui-app/src/public",
"output": "/public"
},
{
"glob": "favicon.ico",
"input": "projects/annotation-ui-app/src",
"output": "/"
},
{
"glob": "**/*",
"input": "node_modules/@hmcts/frontend/assets",
"output": "/public"
},
{
"glob": "**/*",
"input": "node_modules/@hmcts/frontend/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "node_modules/govuk-frontend/assets",
"output": "/public"
},
{
"glob": "**/*",
"input": "node_modules/govuk-frontend/assets",
"output": "/assets"
}
],
"styles": [
"dist/annotation-ui-lib/assets/annotation-ui-theme.scss",
"projects/annotation-ui-app/src/styles.scss"
"dist/annotation-ui-lib/assets/aui-styles.scss"
],
"scripts": [
"dist/annotation-ui-lib/assets/js/pdf.combined.min.js",
Expand Down
3 changes: 2 additions & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"ng": "ng",
"build": "tsc",
"coverage": "npx nyc mocha",
"watch": "nodemon --watch '**/*.ts' --exec 'ts-node' ../dev-server.ts",
"watch-dev-node": "nodemon --watch '**/*.ts' --exec 'ts-node' ../dev-server.ts",
"start-dev-node": "nodemon --watch '**/*.ts' --exec 'ts-node' ../dev-server.ts",
"test": "mocha",
"test:watch": "mocha --watch --recursive --watch-extensions ts",
"start": "cd ../dist/annotation-ui-app-api-api && node server.js"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"name": "@hmcts/annotation-ui-lib",
"version": "1.0.15",
"version": "1.0.16-RC",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "npm run build:node && ng build --prod && ng run annotation-ui:serve",
"build:node": "cd api && npm run build",
"start-dev-proxy": "ng serve --proxy-config proxy.config.json",
"watch-dev-node": "cd api && npm run watch",
"start:ng": "ng serve --proxy-config proxy.config.json",
"start:node": "cd api && npm run start-dev-node",
"watch:node": "cd api && npm run watch-dev-node",
"postBuild": "ts-node ./scripts/css-bundle.ts",
"copy-license": "cp ./README.md dist/annotation-ui-lib",
"copy-readme": "cp ./LICENSE dist/annotation-ui-lib",
"copy-docs": "npm run copy-readme && npm run copy-license",
"copy-assets": "cp -R projects/annotation-ui-lib/src/assets/* dist/annotation-ui-lib/assets/",
"copy-assets": "npm run copy-lib-assets && npm run copy-hmcts-assets && npm run copy-govuk-assets",
"copy-lib-assets": "rsync -r projects/annotation-ui-lib/src/assets/* dist/annotation-ui-lib/assets/",
"copy-hmcts-assets": "rsync -r node_modules/@hmcts/frontend/* dist/annotation-ui-lib/assets/hmcts-frontend",
"copy-govuk-assets": "rsync -r node_modules/govuk-frontend dist/annotation-ui-lib/assets",
"install-js-dependencies": "cd projects/annotation-ui-lib && npm install",
"copy-js-dependencies": "rsync -r projects/annotation-ui-lib/node_modules/@hmcts/pdf-annotate/dist/js dist/annotation-ui-lib/assets",
"copy-files": "npm run copy-js-dependencies && npm run copy-assets && npm run copy-docs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import {Component} from '@angular/core';

@Component({
selector: 'app-annotation-webapp',
templateUrl: './annotation-webapp.component.html',
styleUrls: ['./annotation-webapp.component.scss']
templateUrl: './annotation-webapp.component.html'
})
export class AnnotationWebappComponent {
constructor() {
Expand Down
Empty file.
3 changes: 1 addition & 2 deletions projects/annotation-ui-app/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { AuthService } from './auth/auth.service';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
templateUrl: './app.component.html'
})

export class AppComponent {
Expand Down
6 changes: 1 addition & 5 deletions projects/annotation-ui-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import { HttpClientModule } from '@angular/common/http';
import { AppComponent } from './app.component';
import { AuthModule } from './auth/auth.module';
import { ConfigService } from './config.service';
import { HmctsModule } from './hmcts/hmcts.module';
import { GovukModule } from './govuk/govuk.module';
import { RouterModule } from '@angular/router';
import { RoutingModule } from './routing/routing.module';
import { RoutingModule } from './routing.module';

@NgModule({
declarations: [
Expand All @@ -18,8 +16,6 @@ import { RoutingModule } from './routing/routing.module';
BrowserModule,
HttpClientModule,
AuthModule,
HmctsModule,
GovukModule,
RouterModule,
RoutingModule,
BrowserTransferStateModule
Expand Down
4 changes: 2 additions & 2 deletions projects/annotation-ui-app/src/app/auth/auth.service.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Inject, Injectable } from '@angular/core';
import { Injectable } from '@angular/core';
import { CookieService } from 'ngx-cookie';
import * as jwtDecode from 'jwt-decode';
import { ConfigService } from '../config.service';
import { RedirectionService } from '../routing/redirection.service';
import { RedirectionService } from './redirection.service';

@Injectable({
providedIn: 'root'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import {DOCUMENT} from '@angular/common';
})
export class RedirectionService {

constructor(@Inject(DOCUMENT) private document: any) {

}
constructor(@Inject(DOCUMENT) private document: any) {}

redirect(url) {
this.document.location.href = url;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit a3c6628

Please sign in to comment.