Skip to content

Commit

Permalink
chore: refactor into ts
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-menlo committed Sep 18, 2023
1 parent d7149ac commit 3476f1d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions web-client/electron/main.js → web-client/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const createMainWindow = () => {
webPreferences: {
nodeIntegration: true,
preload: path.join(__dirname, "preload.js"),
// contextIsolation: false,
},
});
const startURL = isDev
Expand All @@ -37,6 +38,7 @@ app.whenReady().then(() => {

pe.init({
// Function to check from the main process that user wants to install a plugin
//@ts-ignore
confirmInstall: async (plugins) => {
const answer = await dialog.showMessageBox({
message: `Are you sure you want to install the plugin ${plugins.join(
Expand Down
4 changes: 2 additions & 2 deletions web-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jan-web",
"version": "0.1.0",
"private": true,
"main": "./electron/main.js",
"main": "./electron/main.ts",
"homepage": "./",
"scripts": {
"dev": "next dev",
Expand All @@ -20,7 +20,7 @@
"productName": "Jan Desktop App",
"files": [
"out/**/*",
"electron/main.js",
"electron/main.ts",
"package.json"
],
"extends": null,
Expand Down
10 changes: 9 additions & 1 deletion web-client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
"@/graphql": ["./graphql/generated/graphql"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "electron/renderer.js", "electron/preload.js", "electron/main.js"],
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"electron/renderer.js",
"electron/preload.js",
"electron/main.ts"
],
"exclude": ["node_modules"]
}

0 comments on commit 3476f1d

Please sign in to comment.