Skip to content

Commit 95ce425

Browse files
committed
Update for yFiles for HTML 2.4.0.0
1 parent 471228d commit 95ce425

30 files changed

+217
-375
lines changed

.browserslistrc

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ indent_size = 2
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11+
[*.ts]
12+
quote_type = single
13+
1114
[*.md]
1215
max_line_length = off
1316
trim_trailing_whitespace = false

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
# profiling files
1414
chrome-profiler-events*.json
15-
speed-measure-plugin*.json
1615

1716
# IDEs and editors
1817
/.idea

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ This sample application serves as a basic scaffold of how to integrate [yFiles f
88

99
## Version Information
1010

11-
- Angular CLI v10.2
12-
- yFiles for HTML 2.3
11+
- Angular CLI v12.1
12+
- yFiles for HTML 2.4
1313

1414
## Getting Started
1515

angular.json

+22-47
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"projects": {
66
"yfiles-angular-cli-integration": {
77
"projectType": "application",
8-
"schematics": {},
8+
"schematics": {
9+
"@schematics/angular:application": {
10+
"strict": true
11+
}
12+
},
913
"root": "",
1014
"sourceRoot": "src",
1115
"prefix": "app",
@@ -18,8 +22,7 @@
1822
"main": "src/main.ts",
1923
"polyfills": "src/polyfills.ts",
2024
"tsConfig": "tsconfig.app.json",
21-
"aot": true,
22-
"assets": ["src/yfiles-typeinfo.js", "src/assets"],
25+
"assets": ["src/favicon.ico", "src/assets"],
2326
"styles": ["src/styles.css"],
2427
"scripts": []
2528
},
@@ -31,39 +34,30 @@
3134
"with": "src/environments/environment.prod.ts"
3235
}
3336
],
34-
"optimization": true,
35-
"outputHashing": "all",
36-
"sourceMap": false,
37-
"extractCss": true,
38-
"namedChunks": false,
39-
"extractLicenses": true,
40-
"vendorChunk": false,
41-
"buildOptimizer": true,
42-
"budgets": [
43-
{
44-
"type": "initial",
45-
"maximumWarning": "2mb",
46-
"maximumError": "5mb"
47-
},
48-
{
49-
"type": "anyComponentStyle",
50-
"maximumWarning": "6kb",
51-
"maximumError": "10kb"
52-
}
53-
]
37+
"outputHashing": "all"
38+
},
39+
"development": {
40+
"buildOptimizer": false,
41+
"optimization": false,
42+
"vendorChunk": true,
43+
"extractLicenses": false,
44+
"sourceMap": true,
45+
"namedChunks": true
5446
}
55-
}
47+
},
48+
"defaultConfiguration": "production"
5649
},
5750
"serve": {
5851
"builder": "@angular-devkit/build-angular:dev-server",
59-
"options": {
60-
"browserTarget": "yfiles-angular-cli-integration:build"
61-
},
6252
"configurations": {
6353
"production": {
6454
"browserTarget": "yfiles-angular-cli-integration:build:production"
55+
},
56+
"development": {
57+
"browserTarget": "yfiles-angular-cli-integration:build:development"
6558
}
66-
}
59+
},
60+
"defaultConfiguration": "development"
6761
},
6862
"extract-i18n": {
6963
"builder": "@angular-devkit/build-angular:extract-i18n",
@@ -82,25 +76,6 @@
8276
"styles": ["src/styles.css"],
8377
"scripts": []
8478
}
85-
},
86-
"lint": {
87-
"builder": "@angular-devkit/build-angular:tslint",
88-
"options": {
89-
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
90-
"exclude": ["**/node_modules/**"]
91-
}
92-
},
93-
"e2e": {
94-
"builder": "@angular-devkit/build-angular:protractor",
95-
"options": {
96-
"protractorConfig": "e2e/protractor.conf.js",
97-
"devServerTarget": "yfiles-angular-cli-integration:serve"
98-
},
99-
"configurations": {
100-
"production": {
101-
"devServerTarget": "yfiles-angular-cli-integration:serve:production"
102-
}
103-
}
10479
}
10580
}
10681
}

browserslist

-12
This file was deleted.

e2e/protractor.conf.js

-30
This file was deleted.

e2e/src/app.e2e-spec.ts

-28
This file was deleted.

e2e/src/app.po.ts

-11
This file was deleted.

e2e/tsconfig.json

-13
This file was deleted.

integration-howto.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ TL;DR Add yFiles as a dependency in the `package.json` and start importing yFile
66

77
## Running the CLI
88

9-
Run the Vue-Cli with `> ng new yfiles-angular-integration-basic` and select following options:
9+
Run the Vue-Cli with `> ng new yfiles-angular-cli-integration` and select following options:
1010

1111
- `? Would you like to add Angular routing?` No
1212
- `? Which stylesheet format whould you like to use?` CSS
@@ -29,12 +29,11 @@ Adding yFiles as a dependency is as easy as installing an external library from
2929
```
3030
"dependencies": {
3131
...
32-
"yfiles": "../yFiles-for-HTML-Complete-2.3.0.3-Evaluation/lib-dev/es-modules/yfiles-23.0.2-eval-dev.tgz"
32+
"yfiles": "../yFiles-for-HTML-Complete-2.4.0.0-Evaluation/lib-dev/es-modules/yfiles-24.0.0-eval-dev.tgz"
3333
},
3434
```
3535
3636
2. Now install the newly added dependency with `npm install`.
37-
3. Include `yfiles.css`, which is an integral part of yFiles for HTML. For example add `@import '~yfiles/yfiles.css';'` to the global styles in `styles.css`.
3837
3938
After installing the dependency, you can import classes from `yfiles` in your project. Since yFiles is installed as proper npm dependency, IDEs provide full code-completion and automatic imports out of the box to easily work with the library.
4039

karma.conf.js

+17-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
11
// Karma configuration file, see link for more information
22
// https://karma-runner.github.io/1.0/config/configuration-file.html
33

4-
module.exports = function(config) {
4+
module.exports = function (config) {
55
config.set({
66
basePath: '',
77
frameworks: ['jasmine', '@angular-devkit/build-angular'],
88
plugins: [
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
13-
require('@angular-devkit/build-angular/plugins/karma')
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma'),
1414
],
1515
client: {
16-
clearContext: false // leave Jasmine Spec Runner output visible in browser
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
1723
},
18-
coverageIstanbulReporter: {
24+
jasmineHtmlReporter: {
25+
suppressAll: true, // removes the duplicated traces
26+
},
27+
coverageReporter: {
1928
dir: require('path').join(__dirname, './coverage/yfiles-angular-cli-integration'),
20-
reports: ['html', 'lcovonly', 'text-summary'],
21-
fixWebpackSourcePaths: true
29+
subdir: '.',
30+
reporters: [{ type: 'html' }, { type: 'text-summary' }],
2231
},
2332
reporters: ['progress', 'kjhtml'],
2433
port: 9876,
@@ -27,6 +36,6 @@ module.exports = function(config) {
2736
autoWatch: true,
2837
browsers: ['Chrome'],
2938
singleRun: false,
30-
restartOnFileChange: true
39+
restartOnFileChange: true,
3140
})
3241
}

package.json

+26-34
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,41 @@
33
"version": "1.0.0",
44
"author": "yWorks GmbH <[email protected]>",
55
"scripts": {
6-
"preinstall": "cd ../yFiles-for-HTML-Complete-2.3.0.4-Evaluation && npm run prepare-package",
7-
"postinstall": "node -e \"require('fs').copyFileSync('../yFiles-for-HTML-Complete-2.3.0.4-Evaluation/lib/license.json','./src/license.json')\"",
6+
"preinstall": "cd ../yFiles-for-HTML-Complete-2.4.0.0-Evaluation && npm run prepare-package",
7+
"postinstall": "node -e \"require('fs').copyFileSync('../yFiles-for-HTML-Complete-2.4.0.0-Evaluation/lib/license.json','./src/license.json')\"",
88
"ng": "ng",
99
"start": "ng serve",
1010
"build": "node --max_old_space_size=6000 node_modules/@angular/cli/bin/ng build",
11-
"test": "ng test",
12-
"lint": "ng lint",
13-
"e2e": "ng e2e"
11+
"watch": "ng build --watch --configuration development",
12+
"test": "ng test"
1413
},
1514
"private": true,
1615
"dependencies": {
17-
"@angular/animations": "~10.2.4",
18-
"@angular/common": "~10.2.4",
19-
"@angular/compiler": "~10.2.4",
20-
"@angular/core": "~10.2.4",
21-
"@angular/forms": "~10.2.4",
22-
"@angular/platform-browser": "~10.2.4",
23-
"@angular/platform-browser-dynamic": "~10.2.4",
24-
"@angular/router": "~10.2.4",
25-
"rxjs": "~6.6.3",
26-
"tslib": "^2.0.3",
27-
"yfiles": "../yFiles-for-HTML-Complete-2.3.0.4-Evaluation/lib-dev/es-modules/yfiles-23.0.4-eval-dev.tgz",
28-
"zone.js": "~0.11.3"
16+
"@angular/animations": "~12.1.0",
17+
"@angular/common": "~12.1.0",
18+
"@angular/compiler": "~12.1.0",
19+
"@angular/core": "~12.1.0",
20+
"@angular/forms": "~12.1.0",
21+
"@angular/platform-browser": "~12.1.0",
22+
"@angular/platform-browser-dynamic": "~12.1.0",
23+
"@angular/router": "~12.1.0",
24+
"rxjs": "~7.1.0",
25+
"tslib": "^2.3.0",
26+
"yfiles": "../yFiles-for-HTML-Complete-2.4.0.0-Evaluation/lib-dev/es-modules/yfiles-24.0.0-eval-dev.tgz",
27+
"zone.js": "~0.11.4"
2928
},
3029
"devDependencies": {
31-
"@angular-devkit/build-angular": "~0.1002.1",
32-
"@angular/cli": "~10.2.1",
33-
"@angular/compiler-cli": "~10.2.4",
34-
"@angular/language-service": "~10.2.4",
35-
"@types/node": "^14.14.14",
36-
"@types/jasmine": "~3.6.2",
37-
"@types/jasminewd2": "~2.0.8",
38-
"codelyzer": "^6.0.1",
39-
"jasmine-core": "~3.6.0",
40-
"jasmine-spec-reporter": "~6.0.0",
41-
"karma": "~5.2.3",
30+
"@angular-devkit/build-angular": "~12.1.0",
31+
"@angular/cli": "~12.1.0",
32+
"@angular/compiler-cli": "~12.1.0",
33+
"@types/jasmine": "~3.7.7",
34+
"@types/node": "^15.12.4",
35+
"jasmine-core": "~3.7.1",
36+
"karma": "~6.3.4",
4237
"karma-chrome-launcher": "~3.1.0",
43-
"karma-coverage-istanbul-reporter": "~3.0.3",
38+
"karma-coverage": "~2.0.3",
4439
"karma-jasmine": "~4.0.1",
45-
"karma-jasmine-html-reporter": "^1.5.4",
46-
"protractor": "~7.0.0",
47-
"ts-node": "~9.1.1",
48-
"tslint": "~6.1.3",
49-
"typescript": "~3.9.7"
40+
"karma-jasmine-html-reporter": "^1.6.0",
41+
"typescript": "~4.2.4"
5042
}
5143
}

0 commit comments

Comments
 (0)