Skip to content

Commit 0e27102

Browse files
authored
Merge pull request #550 from europeana/develop
Merge develop into master
2 parents 7f55b99 + f0902f1 commit 0e27102

File tree

583 files changed

+7962
-3681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

583 files changed

+7962
-3681
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = {
44
env: {
55
node: true
66
},
7+
ignorePatterns: ['**/dist/*', '**/cypress/plugins/*', '**/cypress/fixtures/*'],
78
parser: '@typescript-eslint/parser',
89
parserOptions: {
910
project: path.resolve(__dirname, './tsconfig.json'),

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
.idea
33
.scannerwork
44

5-
/coverage
5+
**/coverage
6+
**/dist
67
/dist
78
/node_modules
8-
/src/environments/apisettings.ts
9-
/tmp
9+
/projects/**/apisettings.ts
10+
**/tmp

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
src/environments/apisettings.ts
1+
**/src/environments/apisettings.ts
2+
**/dist

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ before_install:
1717
- export TZ=Europe/Amsterdam
1818

1919
before_script:
20-
- cp src/environments/apisettings-test.ts src/environments/apisettings.ts
20+
- cp projects/metis/src/environments/apisettings-test.ts projects/metis/src/environments/apisettings.ts
21+
- cp projects/sandbox/src/environments/apisettings-ci.ts projects/sandbox/src/environments/apisettings.ts

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@
22

33
[![Build Status](https://travis-ci.org/europeana/metis-ui.svg?branch=develop)](https://travis-ci.org/europeana/metis-ui)
44

5-
## Getting started
5+
## Repository Contents
6+
7+
This repository is an angular workspace configured to build the projects:
8+
9+
* metis-ui
10+
* mentis-sandbox (placeholder)
11+
12+
13+
## Getting started (Metis-UI)
614

715
To run the Metis UI you need to provide a backend server to connect to. Copy `apisettings-test.ts` to `apisettings.ts` and fill in the URL's:
816

9-
cp src/environments/apisettings-example.ts src/environments/apisettings.ts
17+
cp projects/metis/src/environments/apisettings-example.ts projects/metis/src/environments/apisettings.ts
1018

1119
If you are working at Europeana, just ask Andy MacLean or Mirjam Verloop for the right `apisettings.ts` file.
1220

13-
Make sure you have `node` version 12 and `npm` version 6.x:
21+
## Getting started (Metis-UI and Sandbox)
22+
23+
Make sure you have `node` version 14 and `npm` version 6.x:
1424

1525
node --version
1626
npm --version
@@ -21,7 +31,9 @@ Get the `npm` dependencies:
2131

2232
## Development server
2333

24-
Run `npm start` for a dev server. Navigate to [http://localhost:4200/](http://localhost:4200/). The app will automatically reload if you change any of the source files.
34+
Run `npm start-metis` or just `npm start`for a dev server. Navigate to [http://localhost:4200/](http://localhost:4200/). The `(metis-ui)` app will automatically reload if you change any of the source files.
35+
36+
Run `npm start-sandbox` to run a dev server for the sandbox.
2537

2638
## Branches and Pull Requests
2739

@@ -94,15 +106,17 @@ We use Angular AOT compiling with `fullTemplateTypeCheck: true` to do limited ch
94106

95107
## Build
96108

97-
Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory. Use `npm run dist` for a production build.
109+
Run `npm run build-metis` or `npm run build-sandbox` to build a single project, or run `npm run build` to build both projects. The build artifacts will be stored in the relative `projects/[PROJECT_NAME]/dist/` sub-directories.
110+
111+
Use `npm run dist-metis`or `npm run dist-sandbox` for a production build (stored in the `/dist` directory).
98112

99113
## Deploy
100114

101115
We use jenkins to deploy. Make sure you can access [https://jenkins.eanadev.org/](https://jenkins.eanadev.org/) and use the following jobs:
102-
103116
- `develop_deploy-test_metis-ui-angular_bluemix`
104117
- `develop_deploy-acceptance_metis-ui-angular_bluemix`
105118
- `branch_deploy-production_metis-ui-angular_bluemix`
119+
- `Sandbox-UI-Test`
106120

107121
The test and acceptance jobs should be run off the `develop` branch.
108122

angular.json

Lines changed: 154 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,32 @@
44
"newProjectRoot": "projects",
55
"projects": {
66
"metis": {
7-
"root": "",
8-
"sourceRoot": "src",
7+
"prefix": "app",
98
"projectType": "application",
9+
"root": "projects/metis",
10+
"schematics": {
11+
"@schematics/angular:component": {
12+
"style": "scss"
13+
}
14+
},
15+
"sourceRoot": "projects/metis/src",
1016
"architect": {
1117
"build": {
1218
"builder": "@angular-devkit/build-angular:browser",
1319
"options": {
1420
"aot": true,
15-
"outputPath": "dist",
16-
"index": "src/index.html",
17-
"main": "src/main.ts",
18-
"tsConfig": "src/tsconfig.app.json",
19-
"polyfills": "src/polyfills.ts",
21+
"outputPath": "projects/metis/dist/metis",
22+
"index": "projects/metis/src/index.html",
23+
"main": "projects/metis/src/main.ts",
24+
"tsConfig": "projects/metis/src/tsconfig.app.json",
25+
"polyfills": "projects/metis/src/polyfills.ts",
26+
"progress": false,
2027
"allowedCommonJsDependencies": ["@ctrl/ngx-codemirror", "codemirror"],
2128
"stylePreprocessorOptions": {
22-
"includePaths": []
29+
"includePaths": ["shared-styles"]
2330
},
24-
"assets": ["src/assets", "src/favicon.ico"],
25-
"styles": ["src/styles.scss"],
31+
"assets": ["projects/metis/src/assets", "projects/metis/src/favicon.ico"],
32+
"styles": ["projects/metis/src/styles.scss"],
2633
"scripts": []
2734
},
2835
"configurations": {
@@ -50,8 +57,8 @@
5057
],
5158
"fileReplacements": [
5259
{
53-
"replace": "src/environments/apisettings.ts",
54-
"with": "src/environments/apisettings-ci.ts"
60+
"replace": "projects/metis/src/environments/apisettings.ts",
61+
"with": "projects/metis/src/environments/apisettings-ci.ts"
5562
}
5663
]
5764
}
@@ -80,43 +87,155 @@
8087
"test": {
8188
"builder": "@angular-devkit/build-angular:karma",
8289
"options": {
83-
"main": "src/test.ts",
84-
"karmaConfig": "./karma.conf.cjs",
85-
"polyfills": "src/polyfills.ts",
86-
"tsConfig": "src/tsconfig.spec.json",
90+
"main": "projects/metis/src/test.ts",
91+
"karmaConfig": "projects/metis/karma.conf.cjs",
92+
"polyfills": "projects/metis/src/polyfills.ts",
93+
"tsConfig": "projects/metis/src/tsconfig.spec.json",
8794
"scripts": [],
88-
"styles": ["src/styles.scss"],
95+
"styles": ["projects/metis/src/styles.scss"],
8996
"stylePreprocessorOptions": {
9097
"includePaths": []
9198
},
92-
"assets": ["src/assets", "src/favicon.ico"]
99+
"assets": ["projects/metis/src/assets", "projects/metis/src/favicon.ico"]
93100
}
94101
}
95102
}
96103
},
97-
"metis-cypress": {
98-
"root": "",
99-
"sourceRoot": "cypress",
104+
"sandbox": {
105+
"prefix": "sb",
100106
"projectType": "application",
107+
"root": "projects/sandbox",
108+
"sourceRoot": "projects/sandbox/src",
109+
"schematics": {
110+
"@schematics/angular:component": {
111+
"style": "scss"
112+
}
113+
},
114+
"architect": {
115+
"build": {
116+
"builder": "@angular-devkit/build-angular:browser",
117+
"options": {
118+
"aot": true,
119+
"outputPath": "projects/sandbox/dist/sandbox",
120+
"index": "projects/sandbox/src/index.html",
121+
"main": "projects/sandbox/src/main.ts",
122+
"tsConfig": "projects/sandbox/src/tsconfig.app.json",
123+
"polyfills": "projects/sandbox/src/polyfills.ts",
124+
"progress": false,
125+
"assets": ["projects/sandbox/src/favicon.ico", "projects/sandbox/src/assets"],
126+
"styles": ["projects/sandbox/src/styles.scss"],
127+
"stylePreprocessorOptions": {
128+
"includePaths": ["shared-styles"]
129+
},
130+
"scripts": []
131+
},
132+
"configurations": {
133+
"production": {
134+
"aot": true,
135+
"fileReplacements": [
136+
{
137+
"replace": "projects/sandbox/src/environments/environment.ts",
138+
"with": "projects/sandbox/src/environments/environment.prod.ts"
139+
}
140+
],
141+
"optimization": true,
142+
"outputHashing": "all",
143+
"sourceMap": false,
144+
"namedChunks": false,
145+
"extractLicenses": true,
146+
"buildOptimizer": true,
147+
"budgets": [
148+
{
149+
"type": "initial",
150+
"maximumWarning": "2mb",
151+
"maximumError": "5mb"
152+
},
153+
{
154+
"type": "anyComponentStyle",
155+
"maximumWarning": "100kb",
156+
"maximumError": "100kb"
157+
}
158+
]
159+
},
160+
"e2e": {
161+
"budgets": [
162+
{
163+
"type": "anyComponentStyle",
164+
"maximumWarning": "100kb"
165+
}
166+
],
167+
"fileReplacements": [
168+
{
169+
"replace": "projects/sandbox/src/environments/apisettings.ts",
170+
"with": "projects/sandbox/src/environments/apisettings-ci.ts"
171+
}
172+
]
173+
}
174+
}
175+
},
176+
"serve": {
177+
"builder": "@angular-devkit/build-angular:dev-server",
178+
"options": {
179+
"browserTarget": "sandbox:build"
180+
},
181+
"configurations": {
182+
"production": {
183+
"browserTarget": "sandbox:build:production"
184+
},
185+
"e2e": {
186+
"browserTarget": "sandbox:build:e2e"
187+
}
188+
}
189+
},
190+
"extract-i18n": {
191+
"builder": "@angular-devkit/build-angular:extract-i18n",
192+
"options": {
193+
"browserTarget": "sandbox:build"
194+
}
195+
},
196+
"test": {
197+
"builder": "@angular-devkit/build-angular:karma",
198+
"options": {
199+
"main": "projects/sandbox/src/test.ts",
200+
"karmaConfig": "projects/sandbox/karma.conf.cjs",
201+
"polyfills": "projects/sandbox/src/polyfills.ts",
202+
"tsConfig": "projects/sandbox/src/tsconfig.spec.json",
203+
"scripts": [],
204+
"styles": ["projects/sandbox/src/styles.scss"],
205+
"assets": ["projects/sandbox/src/assets", "projects/sandbox/src/favicon.ico"]
206+
}
207+
}
208+
}
209+
},
210+
"shared": {
211+
"projectType": "library",
212+
"root": "projects/shared",
213+
"sourceRoot": "projects/shared/src",
214+
"prefix": "lib",
101215
"architect": {
102-
"lint": {
103-
"builder": "@angular-devkit/build-angular:tslint",
216+
"build": {
217+
"builder": "@angular-devkit/build-angular:ng-packagr",
218+
"options": {
219+
"tsConfig": "projects/shared/src/tsconfig.lib.prod.json",
220+
"project": "projects/shared/ng-package.json"
221+
},
222+
"configurations": {
223+
"production": {
224+
"tsConfig": "projects/shared/src/tsconfig.lib.prod.json"
225+
}
226+
}
227+
},
228+
"test": {
229+
"builder": "@angular-devkit/build-angular:karma",
104230
"options": {
105-
"tsConfig": ["cypress/tsconfig.json"],
106-
"exclude": []
231+
"main": "projects/shared/src/test.ts",
232+
"polyfills": "projects/shared/src/polyfills.ts",
233+
"tsConfig": "projects/shared/src/tsconfig.spec.json",
234+
"karmaConfig": "projects/shared/karma.conf.cjs"
107235
}
108236
}
109237
}
110238
}
111239
},
112-
"defaultProject": "metis",
113-
"schematics": {
114-
"@schematics/angular:component": {
115-
"prefix": "app",
116-
"style": "scss"
117-
},
118-
"@schematics/angular:directive": {
119-
"prefix": "app"
120-
}
121-
}
240+
"defaultProject": "metis"
122241
}

karma.conf.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function(config) {
1616
clearContext: false // leave Jasmine Spec Runner output visible in browser
1717
},
1818
coverageReporter: {
19-
type : 'html',
19+
type : 'lcov',
2020
dir : 'coverage/'
2121
},
2222
angularCli: {

0 commit comments

Comments
 (0)