Skip to content

Commit

Permalink
GLSP-1179 Switch to composite ts build (#79)
Browse files Browse the repository at this point in the history
+ update to lates dev package & new update script
Part of eclipse-glsp/glsp#1179
  • Loading branch information
tortmayr authored Apr 17, 2024
1 parent 9634f64 commit 38f8bb5
Show file tree
Hide file tree
Showing 14 changed files with 857 additions and 117 deletions.
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.eslint.json"
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json"
}
},
{
Expand All @@ -26,7 +26,7 @@
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.eslint.json"
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json"
}
},
{
Expand All @@ -42,7 +42,7 @@
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.eslint.json"
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json"
}
},
{
Expand All @@ -58,7 +58,7 @@
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.eslint.json"
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json"
}
},
{
Expand Down
11 changes: 4 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": true
"source.fixAll.eslint": "always",
"source.organizeImports": "always"
},
"eslint.validate": [
"javascript",
"typescript"
],
"eslint.validate": ["javascript", "typescript"],
"search.exclude": {
"**/node_modules": true,
"**/lib": true
Expand Down Expand Up @@ -52,4 +49,4 @@
"ul_multi": 3
}
}
}
}
2 changes: 1 addition & 1 deletion examples/workflow-server-bundled/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Eclipse GLSP - Workflow Example Server (bundled)

Provides a bundled version of the Workflow example server for node. This example server is used as dev example in GLSP projects.
Note that this package provides the bundled file. If you are looking for the unbundled source code with type definitons check out
Note that this package provides the bundled file. If you are looking for the unbundled source code with type definitions check out
[`@eclipse-glsp-examples/workflow-server`](https://www.npmjs.com/package/@eclipse-glsp-examples/workflow-server).

## Workflow Diagram Example
Expand Down
7 changes: 3 additions & 4 deletions examples/workflow-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@
"build": "tsc -b && yarn bundle",
"bundle": "webpack",
"bundle:browser": "webpack --env target=webworker ",
"clean": "rimraf lib tsconfig.tsbuildinfo bundle",
"clean": "rimraf lib *.tsbuildinfo",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"prepare": "yarn clean && yarn build",
"watch": "tsc -w"
"watch": "tsc -w",
"watch:bundle": "webpack -w"
},
"dependencies": {
"@eclipse-glsp/layout-elk": "2.2.0-next",
Expand Down
11 changes: 10 additions & 1 deletion examples/workflow-server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"composite": true,
"esModuleInterop": true,
"resolveJsonModule": true
},
"include": ["src"]
"include": ["src", "src/**/*.json"],
"references": [
{
"path": "../../packages/server"
},
{
"path": "../../packages/layout-elk"
}
]
}
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
],
"scripts": {
"all": "yarn install && yarn lint && yarn test",
"build": "lerna run build",
"build": "yarn compile && yarn bundle",
"bundle": "yarn --cwd examples/workflow-server bundle",
"check:headers": "glsp checkHeaders . -t lastCommit",
"check:pr": "yarn all && yarn check:headers",
"clean": "lerna run clean && rimraf coverage .nyc_output",
"lint": "lerna run lint",
"lint:ci": "lerna run lint:ci",
"prepare": "lerna run prepare",
"compile": "tsc -b",
"lint": "eslint --ext .ts,.tsx .",
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"prepare": " yarn compile && yarn bundle",
"publish:latest": "lerna publish from-git --no-git-reset --no-git-tag-version --no-verify-access --no-push",
"publish:next": "lerna publish preminor --exact --canary --preid next --dist-tag next --no-git-reset --no-git-tag-version --no-push --ignore-scripts --yes",
"publish:prepare": "lerna version --ignore-scripts --yes --no-push",
Expand All @@ -23,13 +25,15 @@
"test": "lerna run test",
"test:ci": "lerna run test:ci",
"test:coverage": "lerna run test:coverage",
"test:coverage:ci": "yarn glsp coverageReport .",
"upgrade:next": "yarn upgrade -p '@eclipse-glsp/protocol'",
"watch": "lerna run --parallel watch"
"test:coverage:ci": "glsp coverageReport .",
"upgrade:next": "glsp updateNext",
"watch": "concurrently --kill-others -n tsc,bundle -c red,yellow \"tsc -b -w --preserveWatchOutput\" \"yarn -s watch:bundle\"",
"watch:bundle": "yarn --cwd examples/workflow-server watch:bundle"
},
"devDependencies": {
"@eclipse-glsp/dev": "2.0.0",
"@eclipse-glsp/dev": "next",
"@types/node": "16.x",
"concurrently": "^8.2.2",
"lerna": "^7.0.0",
"typescript": "^5.0.4"
},
Expand Down
4 changes: 1 addition & 3 deletions packages/graph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@
],
"scripts": {
"build": "tsc -b",
"clean": "rimraf lib tsconfig.tsbuildinfo coverage .nyc_output",
"clean": "rimraf lib *.tsbuildinfo coverage .nyc_output",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"prepare": "yarn clean && yarn build",
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
"test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter",
"test:coverage": "nyc yarn test",
Expand Down
1 change: 1 addition & 0 deletions packages/graph/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"composite": true,
"reactNamespace": "JSX"
},
"include": ["src"]
Expand Down
4 changes: 1 addition & 3 deletions packages/layout-elk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@
],
"scripts": {
"build": "tsc -b",
"clean": "rimraf lib tsconfig.tsbuildinfo coverage .nyc_output",
"clean": "rimraf lib *.tsbuildinfo coverage .nyc_output",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"prepare": "yarn clean && yarn build",
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
"test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter",
"test:coverage": "nyc yarn test",
Expand Down
9 changes: 7 additions & 2 deletions packages/layout-elk/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
"rootDir": "src",
"outDir": "lib",
"reactNamespace": "JSX",
"types": ["node", "mocha", "reflect-metadata"]
"composite": true
},
"exclude": ["**/*.spec.ts"],
"include": ["src"]
"include": ["src"],
"references": [
{
"path": "../server"
}
]
}
6 changes: 2 additions & 4 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,15 @@
],
"scripts": {
"build": "tsc -b",
"clean": "rimraf lib tsconfig.tsbuildinfo coverage .nyc_output",
"clean": "rimraf lib *.tsbuildinfo coverage .nyc_output",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"prepare": "yarn clean && yarn build",
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
"test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter",
"test:coverage": "nyc yarn test:ci",
"watch": "tsc -w"
},
"dependencies": {
"@eclipse-glsp/graph": "^2.2.0-next",
"@eclipse-glsp/graph": "2.2.0-next",
"@eclipse-glsp/protocol": "next",
"@types/uuid": "8.3.1",
"commander": "^8.3.0",
Expand Down
10 changes: 8 additions & 2 deletions packages/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
"extends": "@eclipse-glsp/ts-config/mocha",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
"outDir": "lib",
"composite": true
},
"exclude": ["**/*.spec.ts", "src/common/test/mock-util.ts"],
"include": ["src"]
"include": ["src"],
"references": [
{
"path": "../graph"
}
]
}
22 changes: 22 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "@eclipse-glsp/ts-config/mocha",
"include": [],
"compilerOptions": {
"composite": true,
"resolveJsonModule": true
},
"references": [
{
"path": "./packages/graph"
},
{
"path": "./packages/layout-elk"
},
{
"path": "./packages/server"
},
{
"path": "./examples/workflow-server"
}
]
}
Loading

0 comments on commit 38f8bb5

Please sign in to comment.