This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HARP-6198: Use Typescript project references (experiment).
Signed-off-by: Zbigniew Zagorski <ext-zbyszek.zagorski@here.com>
- Loading branch information
Zbigniew Zagorski
committed
Jun 26, 2019
1 parent
3f1a1c3
commit b22f692
Showing
55 changed files
with
647 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,7 @@ doc/ | |
test-npm-packages-app/ | ||
.vscode/ | ||
.DS_Store | ||
|
||
*.d.ts | ||
*.js | ||
*.js.map | ||
tsconfig-build.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"diff": true, | ||
"spec": ["./test/**/*.js", "./@here/*/test/**/*.js"], | ||
"exclude": ["./@here/harp-mapview/test/resources/testWorker.js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "commonjs", | ||
"lib": ["es2017", "dom"], | ||
"rootDir": "src", | ||
"outDir": "lib", | ||
"sourceMap": true, | ||
"declaration": true, | ||
"strictNullChecks": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noUnusedLocals": false, | ||
"downlevelIteration": true | ||
}, | ||
"exclude": ["node_modules"], | ||
"include": ["src/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "../../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [ | ||
{ "path": "../tsconfig-build.json" }, | ||
{ "path": "../../harp-geoutils/tsconfig-build.json" }, | ||
{ "path": "../../harp-utils/tsconfig-build.json" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"outDir": ".", | ||
"rootDir": "." | ||
}, | ||
"references": [ | ||
{ "path": "../harp-geoutils/tsconfig-build.json" }, | ||
{ "path": "../harp-utils/tsconfig-build.json" } | ||
], | ||
"exclude": ["test/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [ | ||
{ "path": "../harp-lrucache/tsconfig-build.json" }, | ||
{ "path": "../harp-geoutils/tsconfig-build.json" }, | ||
{ "path": "../harp-mapview/tsconfig-build.json" } | ||
], | ||
"exclude": ["test/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"extends": "../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": ".", | ||
"resolveJsonModule": true | ||
}, | ||
"references": [ | ||
{ "path": "../harp-datasource-protocol/tsconfig-build.json" }, | ||
{ "path": "../harp-debug-datasource/tsconfig-build.json" }, | ||
{ "path": "../harp-features-datasource/tsconfig-build.json" }, | ||
{ "path": "../harp-geojson-datasource/tsconfig-build.json" }, | ||
{ "path": "../harp-geoutils/tsconfig-build.json" }, | ||
{ "path": "../harp-map-controls/tsconfig-build.json" }, | ||
{ "path": "../harp-mapview/tsconfig-build.json" }, | ||
{ "path": "../harp-omv-datasource/tsconfig-build.json" }, | ||
{ "path": "../harp-text-canvas/tsconfig-build.json" }, | ||
{ "path": "../harp-utils/tsconfig-build.json" }, | ||
{ "path": "../harp-webtile-datasource/tsconfig-build.json" } | ||
], | ||
"include": [ | ||
"./*.ts", | ||
"./src/*.ts", | ||
"./resources/*.ts", | ||
"./decoder/*.ts", | ||
"./src/*.tsx", | ||
"./resources/**/*.json" | ||
], | ||
"exclude": ["test/**/*.ts", "dist/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (C) 2017-2018 HERE Europe B.V. | ||
* Licensed under Apache 2.0, see full license in LICENSE | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/** | ||
* This basically downgrades original webpack.config.js to compile | ||
* only JS created by `tsc -b .` (in current folder). | ||
* | ||
* This is much faster in bigger build process as Typescript runs only once. | ||
* | ||
* Usage: | ||
* - Development | ||
* tsc --build tsconfig-build.json --watch --verbose --listEmittedFiles | ||
* webpack-dev-server --config webpack-build.config.js | ||
* | ||
* - CI | ||
* tsc --build tsconfig-build.json | ||
* webpack --config webpack-build.config.js | ||
*/ | ||
const configs = require('./webpack.config'); | ||
|
||
module.exports = configs.map(config => { | ||
config.resolve.extensions = [".webpack.js", ".web.js", ".js"] | ||
config.module.rules = config.module.rules.filter(rule => rule.loader !== "ts-loader") | ||
config.module.rules.push({ | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
use: ["source-map-loader"], | ||
enforce: "pre" | ||
} | ||
] | ||
}) | ||
for(const entry in config.entries) { | ||
config.entries[entry] = config.entries[entry].replace(/.ts$/, ".js"); | ||
} | ||
return config; | ||
}) | ||
|
||
throw new Foo(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [ | ||
{ "path": "../harp-datasource-protocol/tsconfig-build.json" }, | ||
{ "path": "../harp-geojson-datasource/tsconfig-build.json" }, | ||
{ "path": "../harp-mapview/tsconfig-build.json" }, | ||
{ "path": "../harp-omv-datasource/tsconfig-build.json" } | ||
], | ||
"exclude": ["test/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [{ "path": "../tsconfig-build.json" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"exclude": ["test/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": "../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [ | ||
{ "path": "../harp-datasource-protocol/tsconfig-build.json" }, | ||
{ "path": "../harp-fetch/tsconfig-build.json" }, | ||
{ "path": "../harp-geoutils/tsconfig-build.json" }, | ||
{ "path": "../harp-lines/tsconfig-build.json" }, | ||
{ "path": "../harp-mapview/tsconfig-build.json" }, | ||
{ "path": "../harp-mapview-decoder/tsconfig-build.json" }, | ||
{ "path": "../harp-transfer-manager/tsconfig-build.json" }, | ||
{ "path": "../harp-utils/tsconfig-build.json" } | ||
], | ||
"exclude": ["test/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [{ "path": "../tsconfig-build.json" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [{ "path": "../harp-geoutils/tsconfig-build.json" }], | ||
"exclude": ["test/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "../../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": ".", | ||
"listEmittedFiles": true, | ||
"listFiles": true | ||
}, | ||
"references": [{ "path": "../tsconfig-build.json" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"outDir": ".", | ||
"rootDir": "." | ||
}, | ||
"include": ["lib/**/*.ts", "index.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [{ "path": "../tsconfig-build.json" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"outDir": ".", | ||
"rootDir": "." | ||
}, | ||
"references": [ | ||
{ "path": "../harp-utils/tsconfig-build.json" }, | ||
{ "path": "../harp-materials/tsconfig-build.json" } | ||
], | ||
"exclude": ["test/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "../../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [ | ||
{ "path": "../tsconfig-build.json" }, | ||
{ "path": "../../harp-utils/tsconfig-build.json" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"outDir": ".", | ||
"rootDir": "." | ||
}, | ||
"references": [{ "path": "../harp-utils/tsconfig-build.json" }], | ||
"exclude": ["test/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "../../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [ | ||
{ "path": "../tsconfig-build.json" }, | ||
{ "path": "../../harp-geoutils/tsconfig-build.json" } | ||
] | ||
} |
Oops, something went wrong.