Skip to content

Commit

Permalink
Fix vscode issue. Add proper tsc build configuration to examples inte…
Browse files Browse the repository at this point in the history
…grate it into overall watch
  • Loading branch information
kaisalmen committed Dec 7, 2023
1 parent 518c877 commit 2f7619b
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 14 deletions.
5 changes: 2 additions & 3 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/resources/
/server/*.js
/server/*.js.map
/resources
/lib
3 changes: 2 additions & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
},
"scripts": {
"prepare": "yarn run build",
"clean": "shx rm -fr lib artifacts *.tsbuildinfo",
"compile": "tsc -b tsconfig.json",
"build": "webpack && npm run compile",
"watch": "yarn run watch:browser",
"watch:browser": "webpack --watch",
"watch:server": "tsc -w",
"start": "node ./server/server-app"
"start": "node ./lib/server/server-app"
}
}
2 changes: 1 addition & 1 deletion examples/server/server-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ wsServer.on('connection', socket => {
});
});

serverApp.use(express.static(path.join(__dirname, '..')));
serverApp.use(express.static(path.join(__dirname, '../..')));

const server = serverApp.listen(8080, () => {
console.log('Sprotty examples are available at http://localhost:8080');
Expand Down
19 changes: 13 additions & 6 deletions examples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"composite": false,
"declaration": false,
"declarationMap": false
"outDir": "lib",
"rootDir": "."
},
"include": [
"./server/**/*.ts"
"**/src/**/*.ts",
"**/src/**/*.tsx",
"server/**/*.ts"
],
"exclude": [
"**/*.spec.ts",
"**/*.spec.tsx"
"lib",
"node_modules",
"resources"
],
"references": [
{ "path": "../packages/sprotty-protocol/tsconfig.src.json" },
{ "path": "../packages/sprotty/tsconfig.src.json" },
{ "path": "../packages/sprotty-elk/tsconfig.src.json" },
]
}
3 changes: 2 additions & 1 deletion packages/generator-sprotty/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"src"
],
"exclude": [
"app"
"app",
"node_modules"
]
}
4 changes: 4 additions & 0 deletions packages/sprotty-elk/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
},
"include": [
"src/**/*"
],
"exclude": [
"lib",
"node_modules"
]
}
4 changes: 4 additions & 0 deletions packages/sprotty-protocol/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
},
"include": [
"src/**/*"
],
"exclude": [
"lib",
"node_modules"
]
}
4 changes: 4 additions & 0 deletions packages/sprotty/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
},
"include": [
"src/**/*"
],
"exclude": [
"lib",
"node_modules"
]
}
5 changes: 3 additions & 2 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"files": [],
"references": [
{ "path": "./packages/sprotty-protocol/tsconfig.json" },
{ "path": "./packages/sprotty-protocol/tsconfig.src.json" },
{ "path": "./packages/sprotty-protocol/tsconfig.test.json" },
{ "path": "./packages/sprotty/tsconfig.src.json" },
{ "path": "./packages/sprotty/tsconfig.test.json" },
{ "path": "./packages/sprotty-elk/tsconfig.src.json" },
{ "path": "./packages/sprotty-elk/tsconfig.test.json" },
{ "path": "./packages/generator-sprotty/tsconfig.json" }
{ "path": "./packages/generator-sprotty/tsconfig.json" },
{ "path": "./examples/tsconfig.json" }
]
}

0 comments on commit 2f7619b

Please sign in to comment.