Skip to content

Commit 5a1a14e

Browse files
refactor: remove unused polyfill (CirclonGroup#848)
Closes CirclonGroup#847
1 parent 129aa0f commit 5a1a14e

File tree

7 files changed

+39
-56
lines changed

7 files changed

+39
-56
lines changed

angular.json

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
"projects/example-app/src/favicon.ico",
2828
"projects/example-app/src/assets"
2929
],
30-
"styles": [
31-
"projects/example-app/src/styles.scss"
32-
],
30+
"styles": ["projects/example-app/src/styles.scss"],
3331
"scripts": []
3432
},
3533
"configurations": {
@@ -61,6 +59,15 @@
6159
"maximumError": "10kb"
6260
}
6361
]
62+
},
63+
"es5": {
64+
"budgets": [
65+
{
66+
"type": "anyComponentStyle",
67+
"maximumWarning": "6kb"
68+
}
69+
],
70+
"tsConfig": "projects/example-app/tsconfig.es5.app.json"
6471
}
6572
}
6673
},
@@ -72,6 +79,9 @@
7279
"configurations": {
7380
"production": {
7481
"browserTarget": "example-app:build:production"
82+
},
83+
"es5": {
84+
"browserTarget": "example-app:build:es5"
7585
}
7686
}
7787
},
@@ -86,9 +96,7 @@
8696
"projects/example-app/src/favicon.ico",
8797
"projects/example-app/src/assets"
8898
],
89-
"styles": [
90-
"projects/example-app/src/styles.scss"
91-
],
99+
"styles": ["projects/example-app/src/styles.scss"],
92100
"scripts": []
93101
}
94102
},
@@ -99,9 +107,7 @@
99107
"projects/example-app/tsconfig.app.json",
100108
"projects/example-app/tsconfig.spec.json"
101109
],
102-
"exclude": [
103-
"**/node_modules/**"
104-
]
110+
"exclude": ["**/node_modules/**"]
105111
}
106112
}
107113
}
@@ -134,12 +140,11 @@
134140
"projects/angular-tree-component/tsconfig.lib.json",
135141
"projects/angular-tree-component/tsconfig.spec.json"
136142
],
137-
"exclude": [
138-
"**/node_modules/**"
139-
]
143+
"exclude": ["**/node_modules/**"]
140144
}
141145
}
142146
}
143-
}},
147+
}
148+
},
144149
"defaultProject": "example-app"
145150
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@
4141
"lint": "tslint lib/**/*.ts",
4242
"prepublish:lib:win": "npm run build:lib && npm run copy:files:win",
4343
"start:example-app": "ng serve",
44+
"start:example-app:es5": "ng serve --configuration=es5",
4445
"example:cli:build": "npm run build && cd example/cli && npm install && cp -rf ../../dist node_modules/angular-tree-component/ && cp src/index.build.html src/index.html && ./node_modules/.bin/ng build --aot && cp src/index.dev.html src/index.html && mkdir -p 500tech/angular-tree-component/master/example/cli/ && cp -rf dist 500tech/angular-tree-component/master/example/cli/",
4546
"test:ci:local": "testcafe chrome:headless e2e/*.testcafe.js --app \"ng serve\" -r xunit:./xunit/res.xml -c 4 --assertion-timeout 10000 --app-init-delay 20000 --page-load-timeout 10000 --selector-timeout 20000",
4647
"test:dev": "testcafe chrome:headless e2e/*.testcafe.js",
4748
"test:debug": "testcafe chrome e2e/*.testcafe.js --inspect-brk",
4849
"test:slow": "testcafe chrome e2e/*.testcafe.js --speed 0.1",
49-
"e2e:tsc": "../node_modules/.bin/tsc --p e2e/tsconfig.json"
50+
"e2e:tsc": "../node_modules/.bin/tsc --p e2e/tsconfig.json",
51+
"publish:release": "npm publish ./dist/angular-tree-component",
52+
"publish:next": "npm publish ./dist/angular-tree-component --tag next"
5053
},
5154
"files": [
5255
"dist/"

projects/angular-tree-component/src/lib/angular-tree-component.module.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ModuleWithProviders, NgModule } from '@angular/core';
1+
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { TreeMobxAutorunDirective } from './mobx-angular/tree-mobx-autorun.directive';
44

@@ -33,8 +33,6 @@ import { TreeDropDirective } from './directives/tree-drop.directive';
3333
import { TreeDragDirective } from './directives/tree-drag.directive';
3434
import { TreeAnimateOpenDirective } from './directives/tree-animate-open.directive';
3535

36-
import './polyfills';
37-
3836
@NgModule({
3937
declarations: [
4038
TreeComponent,
@@ -73,8 +71,7 @@ import './polyfills';
7371
imports: [CommonModule],
7472
providers: []
7573
})
76-
export class TreeModule {
77-
}
74+
export class TreeModule {}
7875

7976
export {
8077
TreeModel,

projects/angular-tree-component/src/lib/polyfills.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

projects/angular-tree-component/src/lib/vendor/closest.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "../../out-tsc/app",
5+
"target": "es5",
6+
"types": []
7+
},
8+
"files": ["src/main.ts", "src/polyfills.ts"],
9+
"include": ["src/**/*.ts"],
10+
"exclude": ["src/test.ts", "**/*.spec.ts"]
11+
}

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
{
1111
"path": "./projects/example-app/tsconfig.app.json"
1212
},
13+
{
14+
"path": "./projects/example-app/tsconfig.es5.app.json"
15+
},
1316
{
1417
"path": "./projects/example-app/tsconfig.spec.json"
1518
},
@@ -20,4 +23,4 @@
2023
"path": "./projects/angular-tree-component/tsconfig.spec.json"
2124
}
2225
]
23-
}
26+
}

0 commit comments

Comments
 (0)