Skip to content

Commit beaaf67

Browse files
committed
Migrating to angular 10
1 parent 56fb49a commit beaaf67

File tree

83 files changed

+2508
-18833
lines changed

Some content is hidden

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

83 files changed

+2508
-18833
lines changed

.editorconfig

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Editor configuration, see http://editorconfig.org
1+
# Editor configuration, see https://editorconfig.org
22
root = true
33

44
[*]
@@ -8,6 +8,9 @@ indent_size = 4
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

+8-10
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22

33
# compiled output
44
/dist
5-
/dist-server
65
/tmp
76
/out-tsc
8-
dist.tgz
7+
# Only exists if Bazel was run
8+
/bazel-out
99

1010
# dependencies
1111
/node_modules
1212

13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
1317
# IDEs and editors
1418
/.idea
1519
.project
@@ -25,24 +29,18 @@ dist.tgz
2529
!.vscode/tasks.json
2630
!.vscode/launch.json
2731
!.vscode/extensions.json
32+
.history/*
2833

2934
# misc
3035
/.sass-cache
3136
/connect.lock
32-
coverage/
37+
/coverage
3338
/libpeerconnection.log
3439
npm-debug.log
3540
yarn-error.log
3641
testem.log
3742
/typings
3843

39-
# e2e
40-
/e2e/*.js
41-
/e2e/*.map
42-
4344
# System Files
4445
.DS_Store
4546
Thumbs.db
46-
47-
# ng-packagr
48-
.ng_pkg_build

.npmignore

-7
This file was deleted.

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
4+
## [3.0.0] - 2020-08-20
5+
### Changed
6+
- Upgraded to angular 10.0
7+
- Moving to angular library format
8+
9+
310
## [2.0.0] - 2020-02-28
411
### Changed
512
- Upgraded to angular 9.0 (See https://github.com/plotly/angular-plotly.js/issues/101)

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Plotly, Inc
3+
Copyright (c) 2020 Plotly, Inc
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

angular.json

+41-135
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,50 @@
11
{
2-
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3-
"version": 1,
4-
"newProjectRoot": "projects",
5-
"projects": {
6-
"angular-plotly.js": {
7-
"root": "",
8-
"sourceRoot": "src",
9-
"projectType": "application",
10-
"architect": {
11-
"build": {
12-
"builder": "@angular-devkit/build-angular:browser",
13-
"options": {
14-
"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",
20-
"assets": [
21-
"src/assets",
22-
"src/favicon.ico"
23-
],
24-
"styles": [
25-
"src/styles.css"
26-
],
27-
"scripts": [
28-
"node_modules/plotly.js/dist/plotly.min.js"
29-
]
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"plotly": {
7+
"projectType": "library",
8+
"root": "projects/plotly",
9+
"sourceRoot": "projects/plotly/src",
10+
"prefix": "lib",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular-devkit/build-ng-packagr:build",
14+
"options": {
15+
"tsConfig": "projects/plotly/tsconfig.lib.json",
16+
"project": "projects/plotly/ng-package.json"
17+
},
18+
"configurations": {
19+
"production": {
20+
"tsConfig": "projects/plotly/tsconfig.lib.prod.json"
21+
}
22+
}
3023
},
31-
"configurations": {
32-
"production": {
33-
"budgets": [
34-
{
35-
"type": "anyComponentStyle",
36-
"maximumWarning": "6kb"
37-
}
38-
],
39-
"optimization": true,
40-
"outputHashing": "all",
41-
"sourceMap": false,
42-
"extractCss": true,
43-
"namedChunks": false,
44-
"aot": true,
45-
"extractLicenses": true,
46-
"vendorChunk": false,
47-
"buildOptimizer": true,
48-
"fileReplacements": [
49-
{
50-
"replace": "src/environments/environment.ts",
51-
"with": "src/environments/environment.prod.ts"
52-
}
53-
]
24+
"test": {
25+
"builder": "@angular-devkit/build-angular:karma",
26+
"options": {
27+
"main": "projects/plotly/src/test.ts",
28+
"tsConfig": "projects/plotly/tsconfig.spec.json",
29+
"karmaConfig": "projects/plotly/karma.conf.js"
5430
}
55-
}
56-
},
57-
"serve": {
58-
"builder": "@angular-devkit/build-angular:dev-server",
59-
"options": {
60-
"browserTarget": "angular-plotly.js:build"
6131
},
62-
"configurations": {
63-
"production": {
64-
"browserTarget": "angular-plotly.js:build:production"
32+
"lint": {
33+
"builder": "@angular-devkit/build-angular:tslint",
34+
"options": {
35+
"tsConfig": [
36+
"projects/plotly/tsconfig.lib.json",
37+
"projects/plotly/tsconfig.spec.json"
38+
],
39+
"exclude": [
40+
"**/node_modules/**"
41+
]
6542
}
6643
}
67-
},
68-
"extract-i18n": {
69-
"builder": "@angular-devkit/build-angular:extract-i18n",
70-
"options": {
71-
"browserTarget": "angular-plotly.js:build"
72-
}
73-
},
74-
"test": {
75-
"builder": "@angular-devkit/build-angular:karma",
76-
"options": {
77-
"main": "src/test.ts",
78-
"karmaConfig": "./karma.conf.js",
79-
"polyfills": "src/polyfills.ts",
80-
"tsConfig": "src/tsconfig.spec.json",
81-
"scripts": [],
82-
"styles": [
83-
"src/styles.css"
84-
],
85-
"assets": [
86-
"src/assets",
87-
"src/favicon.ico"
88-
]
89-
}
90-
},
91-
"lint": {
92-
"builder": "@angular-devkit/build-angular:tslint",
93-
"options": {
94-
"tsConfig": [
95-
"src/tsconfig.app.json",
96-
"src/tsconfig.spec.json"
97-
],
98-
"exclude": [
99-
"**/node_modules/**"
100-
]
101-
}
102-
}
103-
}
104-
},
105-
"angular-plotly.js-e2e": {
106-
"root": "e2e",
107-
"sourceRoot": "e2e",
108-
"projectType": "application",
109-
"architect": {
110-
"e2e": {
111-
"builder": "@angular-devkit/build-angular:protractor",
112-
"options": {
113-
"protractorConfig": "./protractor.conf.js",
114-
"devServerTarget": "angular-plotly.js:serve"
115-
}
116-
},
117-
"lint": {
118-
"builder": "@angular-devkit/build-angular:tslint",
119-
"options": {
120-
"tsConfig": [
121-
"e2e/tsconfig.e2e.json"
122-
],
123-
"exclude": [
124-
"**/node_modules/**"
125-
]
126-
}
12744
}
128-
}
129-
}
130-
},
131-
"defaultProject": "angular-plotly.js",
132-
"schematics": {
133-
"@schematics/angular:component": {
134-
"prefix": "plotly",
135-
"style": "css"
45+
}},
46+
"cli": {
47+
"analytics": false
13648
},
137-
"@schematics/angular:directive": {
138-
"prefix": "plotly"
139-
}
140-
},
141-
"cli": {
142-
"analytics": "54eda63f-d875-4cef-9211-d2e2dd14ac9f"
49+
"defaultProject": "angular-plotlyjs"
14350
}
144-
}

devdocs.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## How to publish on npm
2+
3+
* `ng test --codeCoverage=true --progress=true --watch=false`
4+
* `ng build plotly --prod`
5+
* `npm publish dist/plotly`

e2e/tsconfig.e2e.json

-1
This file was deleted.

index.ts

-1
This file was deleted.

ng-package.json

-6
This file was deleted.

0 commit comments

Comments
 (0)