This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Typescript project references (experiment).
* introduce optional, parallel `tsc --build` based build system Signed-off-by: Zbigniew Zagorski <ext-zbyszek.zagorski@here.com>
- Loading branch information
Zbigniew Zagorski
committed
Oct 30, 2019
1 parent
a0e15f8
commit 36ab7d4
Showing
53 changed files
with
611 additions
and
40 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
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,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,31 @@ | ||
{ | ||
"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", | ||
"./lib/*.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,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": { | ||
"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
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" } | ||
] | ||
} |
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-geoutils/tsconfig-build.json" }, | ||
{ "path": "../harp-mapview/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,11 @@ | ||
{ | ||
"extends": "../../../tsconfig.settings.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "." | ||
}, | ||
"references": [ | ||
{ "path": "../tsconfig-build.json" }, | ||
{ "path": "../../harp-test-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,16 @@ | ||
{ | ||
"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-mapview/tsconfig-build.json" }, | ||
{ "path": "../harp-utils/tsconfig-build.json" }, | ||
{ "path": "../harp-test-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-test-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,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-lrucache/tsconfig-build.json" }, | ||
{ "path": "../harp-materials/tsconfig-build.json" }, | ||
{ "path": "../harp-text-canvas/tsconfig-build.json" }, | ||
{ "path": "../harp-utils/tsconfig-build.json" } | ||
], | ||
"exclude": ["test/**/*.ts"] | ||
} |
Oops, something went wrong.