Skip to content

Commit

Permalink
➕ convert telemetry app to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAfroOfDoom committed Oct 31, 2024
1 parent 2ab5954 commit 7bc7c29
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 5 deletions.
3 changes: 2 additions & 1 deletion telemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"devDependencies": {
"electron": "33.0.2",
"esbuild": "0.24.0"
"esbuild": "0.24.0",
"typescript": "5.6.3"
}
}
2 changes: 1 addition & 1 deletion telemetry/scripts/esbuild.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { build } = require("esbuild");
build({
entryPoints: ["main.js"],
entryPoints: ["src/main.ts"],
outfile: "dist/main.js",
bundle: true,
platform: "node",
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions telemetry/main.js → telemetry/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const { app, BrowserWindow } = require('electron');
const { resolve } = require('path');
import { app, BrowserWindow } from "electron";
import { resolve } from "path";

const createWindow = () => {
const win = new BrowserWindow({
width: 800,
height: 600,
});

win.loadFile(resolve('./index.html'));
win.loadFile(resolve("./src/index.html"));
};

app.whenReady().then(() => {
Expand Down
9 changes: 9 additions & 0 deletions telemetry/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"include": ["src/**/*"],
"compilerOptions": {
"module": "preserve",
"moduleResolution": "bundler",
"noEmit": true,
"skipLibCheck": true
}
}
21 changes: 21 additions & 0 deletions telemetry/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ __metadata:
dependencies:
electron: 33.0.2
esbuild: 0.24.0
typescript: 5.6.3
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -919,6 +920,26 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:5.6.3":
version: 5.6.3
resolution: "typescript@npm:5.6.3"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ba302f8822777ebefb28b554105f3e074466b671e7444ec6b75dadc008a62f46f373d9e57ceced1c433756d06c8b7dc569a7eefdf3a9573122a49205ff99021a
languageName: node
linkType: hard

"typescript@patch:[email protected]#~builtin<compat/typescript>":
version: 5.6.3
resolution: "typescript@patch:typescript@npm%3A5.6.3#~builtin<compat/typescript>::version=5.6.3&hash=f3b441"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ade87bce2363ee963eed0e4ca8a312ea02c81873ebd53609bc3f6dc0a57f6e61ad7e3fb8cbb7f7ab8b5081cbee801b023f7c4823ee70b1c447eae050e6c7622b
languageName: node
linkType: hard

"undici-types@npm:~6.19.2, undici-types@npm:~6.19.8":
version: 6.19.8
resolution: "undici-types@npm:6.19.8"
Expand Down

0 comments on commit 7bc7c29

Please sign in to comment.