Skip to content

Commit f6a13d3

Browse files
committed
GLSP-1179 Switch to composite ts build
Part of eclipse-glsp/glsp/issues/1179
1 parent 11ab9a1 commit f6a13d3

File tree

13 files changed

+126
-33
lines changed

13 files changed

+126
-33
lines changed

example/workflow/extension/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
"dist"
3030
],
3131
"scripts": {
32-
"build": "tsc -b && yarn bundle",
32+
"build": "yarn compile && yarn bundle",
3333
"bundle": "webpack",
3434
"bundle:prod": "webpack --config ./webpack.prod.js",
3535
"clean": "rimraf lib tsconfig.tsbuildinfo dist",
36+
"compile": "tsc -b",
3637
"lint": "eslint --ext .ts,.tsx ./src",
37-
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
3838
"package": "vsce package --yarn",
39-
"prepare": "yarn clean && yarn build",
40-
"watch": "tsc -w"
39+
"watch": "tsc -w",
40+
"watch:bundle": "webpack --watch"
4141
},
4242
"contributes": {
4343
"commands": [
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
22
"extends": "@eclipse-glsp/ts-config",
33
"compilerOptions": {
4+
"composite": true,
45
"rootDir": "src",
5-
"outDir": "lib",
6-
"resolveJsonModule": true
6+
"outDir": "lib"
77
},
8-
"include": ["src", "server", "dist"]
8+
"include": ["src", "dist"],
9+
"references": [
10+
{
11+
"path": "../../../packages/vscode-integration"
12+
}
13+
]
914
}

example/workflow/web-extension/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@
3030
"dist"
3131
],
3232
"scripts": {
33-
"build": "tsc -b && yarn bundle",
33+
"build": "yarn compile && yarn bundle",
3434
"bundle": "webpack",
3535
"bundle:prod": "webpack --config ./webpack.prod.js",
3636
"clean": "rimraf lib tsconfig.tsbuildinfo ",
37+
"compile": "tsc-b",
3738
"lint": "eslint --ext .ts,.tsx ./src",
38-
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
3939
"package": "vsce package --yarn",
40-
"prepare": "yarn clean && yarn build",
41-
"watch": "tsc -w"
40+
"watch": "tsc -w",
41+
"watch:bundle": "webpack --watch"
4242
},
4343
"contributes": {
4444
"commands": [
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
22
"extends": "@eclipse-glsp/ts-config",
33
"compilerOptions": {
4+
"composite": true,
45
"rootDir": "src",
5-
"outDir": "lib",
6-
"resolveJsonModule": true
6+
"outDir": "lib"
77
},
8-
"include": ["src", "dist"]
8+
"include": ["src", "dist"],
9+
"references": [
10+
{
11+
"path": "../../../packages/vscode-integration"
12+
}
13+
]
914
}

example/workflow/webview/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,12 @@
2828
}
2929
],
3030
"scripts": {
31-
"build": "tsc -b && yarn bundle",
31+
"build": "yarn compile && yarn bundle",
3232
"bundle": "webpack",
3333
"bundle:prod": "webpack --config ./webpack.prod.js",
3434
"clean": "rimraf lib tsconfig.tsbuildinfo dist",
35+
"compile": "tsc -b",
3536
"lint": "eslint --ext .ts,.tsx ./src",
36-
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
37-
"prepare": "yarn clean && yarn build",
3837
"watch": "tsc -w"
3938
},
4039
"devDependencies": {
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
22
"extends": "@eclipse-glsp/ts-config/tsconfig.json",
33
"compilerOptions": {
4+
"composite": true,
45
"rootDir": "src",
56
"outDir": "lib"
67
},
7-
"include": ["src"]
8+
"include": ["src"],
9+
"references": [
10+
{
11+
"path": "../../../packages/vscode-integration-webview"
12+
}
13+
]
814
}

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,29 @@
66
],
77
"scripts": {
88
"all": "yarn install && yarn lint",
9-
"build": "lerna run build",
9+
"build": "yarn compile && yarn bundle",
1010
"bundle": " lerna run bundle",
1111
"bundle:prod": "lerna run bundle:prod",
1212
"check:headers": "glsp checkHeaders . -t lastCommit",
1313
"check:pr": "yarn all && yarn check:headers",
1414
"clean": "lerna run clean && rimraf logs/*.log",
15-
"lint": "lerna run lint",
16-
"lint:ci": "lerna run lint:ci",
17-
"prepare": "lerna run prepare",
15+
"compile": "tsc -b",
16+
"lint": "eslint --ext .ts,.tsx .",
17+
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
18+
"prepare": "yarn build",
1819
"publish:latest": "lerna publish from-git --no-git-reset --no-git-tag-version --no-push",
1920
"publish:next": "lerna publish preminor --exact --canary --preid next --dist-tag next --no-git-reset --no-git-tag-version --no-push --ignore-scripts --yes",
2021
"publish:prepare": "lerna version --ignore-scripts --yes --no-push",
2122
"upgrade:next": "yarn upgrade -p \"@eclipse-glsp.*|sprotty.*\" --next ",
22-
"watch": "lerna run --parallel watch",
23+
"watch": "concurrently --kill-others -n tsc,extension,web-extension -c red,yellow.green \"tsc -b -w --preserveWatchOutput\" \"yarn -s workflow watch:bundle\" \"yarn -s workflow:web watch:bundle\"",
2324
"workflow": "yarn --cwd example/workflow/extension",
2425
"workflow:web": "yarn --cwd example/workflow/web-extension"
2526
},
2627
"devDependencies": {
2728
"@eclipse-glsp/dev": "2.0.0",
2829
"@types/node": "16",
2930
"@types/vscode": "^1.54.0",
31+
"concurrently": "^8.2.2",
3032
"lerna": "^7.0.0",
3133
"typescript": "^5.0.4"
3234
},

packages/vscode-integration-webview/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
"build": "tsc -b",
3838
"clean": "rimraf lib tsconfig.tsbuildinfo ",
3939
"lint": "eslint --ext .ts,.tsx ./src",
40-
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
41-
"prepare": "yarn clean && yarn build",
4240
"watch": "tsc -w"
4341
},
4442
"dependencies": {
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
22
"extends": "@eclipse-glsp/ts-config",
33
"compilerOptions": {
4+
"composite": true,
45
"rootDir": "src",
56
"outDir": "lib"
67
},
7-
"include": ["src"]
8+
"include": ["src"],
9+
"references": [
10+
{
11+
"path": "../vscode-integration"
12+
}
13+
]
814
}

packages/vscode-integration/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
"build": "tsc -b",
4343
"clean": "rimraf lib tsconfig.tsbuildinfo ",
4444
"lint": "eslint --ext .ts,.tsx ./src",
45-
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
46-
"prepare": "yarn clean && yarn build",
4745
"watch": "tsc -w"
4846
},
4947
"dependencies": {

0 commit comments

Comments
 (0)