Skip to content

Commit 33bc477

Browse files
nlm-prohansl
authored andcommitted
test(@angular-devkit/build-ng-packagr): custom tsconfig
Use the new tsConfig option in order to set a custom tsconfig file for the 'work' test this example show how to change the ES level in lib and target all the other options are required for now if we don't want to break the build their should be removed once / if ng-packagr/ng-packagr#786 is released
1 parent c0d0f45 commit 33bc477

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"build": {
1010
"builder": "../../../../packages/angular_devkit/build_ng_packagr:build",
1111
"options": {
12-
"project": "projects/lib/ng-package.json"
12+
"project": "projects/lib/ng-package.json",
13+
"tsConfig": "projects/lib/tsconfig.lib.json"
1314
}
1415
},
1516
"test": {

tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ export class LibService {
55

66
constructor() { }
77

8+
testEs2016() {
9+
return ['foo', 'bar'].includes('foo');
10+
}
11+
812
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es6",
4+
"moduleResolution": "node",
5+
"sourceMap": true,
6+
"inlineSources": true,
7+
"emitDecoratorMetadata": true,
8+
"experimentalDecorators": true,
9+
"importHelpers": true,
10+
"lib": ["dom", "es2016"]
11+
}
12+
}

0 commit comments

Comments
 (0)