Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watch all sprotty packages with a single command from root #394

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ coverage/
npm-debug.log
yarn-error.log
.DS_Store
**/*.tsbuildinfo
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"private": true,
"scripts": {
"prepare": "lerna run prepare",
"prepare": "yarn run clean && yarn run build",
"clean": "lerna run clean",
"build": "lerna run build",
"build": "tsc --build tsconfig.build.json && yarn --cwd examples build",
"watch": "concurrently -n sprotty,examples -c blue,green, \"yarn --cwd examples watch\" \"tsc -b tsconfig.build.json -w\"",
"lint": "eslint {**/src/**/*.ts,**/src/**/*.tsx}",
"lint:fix": "eslint {**/src/**/*.ts,**/src/**/*.tsx} --fix",
"test": "vitest run",
Expand All @@ -16,6 +17,7 @@
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"eslint": "^8.53.0",
"concurrently": "~8.2.1",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-no-null": "^1.0.2",
Expand Down
1 change: 0 additions & 1 deletion packages/generator-sprotty/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"yeoman-test": "^7.4.0"
},
"scripts": {
"prepare": "yarn run clean && yarn run build",
"clean": "rimraf app",
"build": "tsc --skipLibCheck",
"watch": "tsc --watch --skipLibCheck",
Expand Down
4 changes: 3 additions & 1 deletion packages/generator-sprotty/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "app"
"rootDir": "src",
"outDir": "app",
"composite": true
},
"include": [
"src"
Expand Down
3 changes: 1 addition & 2 deletions packages/sprotty-elk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"inversify": "^6.0.1"
},
"scripts": {
"prepare": "yarn run clean && yarn run build",
"clean": "rimraf lib artifacts",
"clean": "rimraf lib artifacts tsconfig.tsbuildinfo",
"build": "tsc -p ./tsconfig.json",
"test": "vitest run --config ../../vite.config.ts",
"watch": "tsc -w -p ./tsconfig.json"
Expand Down
8 changes: 7 additions & 1 deletion packages/sprotty-elk/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"types": [
"node"
]
],
"composite": true
},
"include": [
"src"
],
"exclude": [
"**/*.spec.ts",
"**/*.spec.tsx"
],
"references": [
{ "path": "../sprotty-protocol/tsconfig.json"},
{ "path": "../sprotty/tsconfig.json" }
]
}
3 changes: 1 addition & 2 deletions packages/sprotty-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
},

"scripts": {
"prepare": "yarn run clean && yarn run build",
"clean": "rimraf lib artifacts",
"clean": "rimraf lib artifacts tsconfig.tsbuildinfo",
"build": "tsc -p ./tsconfig.json",
"test": "vitest run --config ../../vite.config.ts",
"watch": "tsc -w -p ./tsconfig.json"
Expand Down
4 changes: 3 additions & 1 deletion packages/sprotty-protocol/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "lib"
"rootDir": "src",
"outDir": "lib",
"composite": true
},
"include": [
"src"
Expand Down
3 changes: 1 addition & 2 deletions packages/sprotty/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
"snabbdom-to-html": "^7.1.0"
},
"scripts": {
"prepare": "yarn run clean && yarn run build",
"clean": "rimraf lib artifacts",
"clean": "rimraf lib artifacts tsconfig.tsbuildinfo",
"build": "tsc -p ./tsconfig.json",
"test": "vitest run --config ../../vite.config.ts",
"watch": "tsc -w -p ./tsconfig.json"
Expand Down
7 changes: 6 additions & 1 deletion packages/sprotty/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "lib"
"rootDir": "src",
"outDir": "lib",
"composite": true
},
"include": [
"src"
],
"exclude": [
"**/*.spec.ts",
"**/*.spec.tsx",
],
"references": [
{ "path": "../sprotty-protocol/tsconfig.json" }
]
}
9 changes: 9 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"files": [],
"references": [
{ "path": "./packages/sprotty-protocol/tsconfig.json" },
{ "path": "./packages/sprotty/tsconfig.json" },
{ "path": "./packages/sprotty-elk/tsconfig.json" },
{ "path": "./packages/generator-sprotty/tsconfig.json" },
]
}
55 changes: 52 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
chalk "^2.4.2"
js-tokens "^4.0.0"

"@babel/runtime@^7.21.0":
version "7.23.2"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885"
integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==
dependencies:
regenerator-runtime "^0.14.0"

"@bcoe/v8-coverage@^0.2.3":
version "0.2.3"
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
Expand Down Expand Up @@ -2076,6 +2083,21 @@ concat-stream@^2.0.0:
readable-stream "^3.0.2"
typedarray "^0.0.6"

concurrently@~8.2.1:
version "8.2.2"
resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-8.2.2.tgz#353141985c198cfa5e4a3ef90082c336b5851784"
integrity sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==
dependencies:
chalk "^4.1.2"
date-fns "^2.30.0"
lodash "^4.17.21"
rxjs "^7.8.1"
shell-quote "^1.8.1"
spawn-command "0.0.2"
supports-color "^8.1.1"
tree-kill "^1.2.2"
yargs "^17.7.2"

console-control-strings@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
Expand Down Expand Up @@ -2234,6 +2256,13 @@ dargs@^7.0.0:
resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc"
integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==

date-fns@^2.30.0:
version "2.30.0"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0"
integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==
dependencies:
"@babel/runtime" "^7.21.0"

dateformat@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
Expand Down Expand Up @@ -5306,6 +5335,11 @@ reflect-metadata@^0.1.13:
resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08"
integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==

regenerator-runtime@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45"
integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==

require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
Expand Down Expand Up @@ -5402,7 +5436,7 @@ rxjs@^6.4.0:
dependencies:
tslib "^1.9.0"

rxjs@^7.2.0, rxjs@^7.5.5:
rxjs@^7.2.0, rxjs@^7.5.5, rxjs@^7.8.1:
version "7.8.1"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543"
integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==
Expand Down Expand Up @@ -5517,6 +5551,11 @@ shebang-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==

shell-quote@^1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680"
integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==

shelljs@^0.8.5:
version "0.8.5"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c"
Expand Down Expand Up @@ -5659,6 +5698,11 @@ source-map@^0.6.0, source-map@^0.6.1:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==

[email protected]:
version "0.0.2"
resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2.tgz#9544e1a43ca045f8531aac1a48cb29bdae62338e"
integrity sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==

spdx-correct@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c"
Expand Down Expand Up @@ -5841,7 +5885,7 @@ supports-color@^7.1.0, supports-color@^7.2.0:
dependencies:
has-flag "^4.0.0"

supports-color@^8.0.0:
supports-color@^8.0.0, supports-color@^8.1.1:
version "8.1.1"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c"
integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==
Expand Down Expand Up @@ -6012,6 +6056,11 @@ tr46@~0.0.3:
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==

tree-kill@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"
integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==

trim-newlines@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
Expand Down Expand Up @@ -6552,7 +6601,7 @@ [email protected], yargs@^16.2.0:
y18n "^5.0.5"
yargs-parser "^20.2.2"

yargs@^17.6.2:
yargs@^17.6.2, yargs@^17.7.2:
version "17.7.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
Expand Down