Skip to content

Commit

Permalink
fix: rm electron check
Browse files Browse the repository at this point in the history
ArcherGu committed Aug 24, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 50ef4f7 commit 72e0933
Showing 3 changed files with 26 additions and 8 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -26,14 +26,13 @@
"build": "tsup",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest run",
"test": "tsup && vitest run",
"prepublishOnly": "npm run build"
},
"peerDependencies": {
"electron": ">=16.0.0"
},
"dependencies": {
"check-package-exists": "^1.1.0",
"colorette": "^2.0.19",
"reflect-metadata": "^0.1.13"
},
27 changes: 25 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'reflect-metadata'
import type { BrowserWindow } from 'electron'
import { app, ipcMain } from 'electron'
import { checkPackageExists } from 'check-package-exists'
import { DEFAULT_WIN_NAME, INJECTABLE, INJECT_NAME, INJECT_TYPE, IPC_HANDLE, IPC_ON, IPC_SEND, IPC_WIN_NAME, PARAMTYPES_METADATA } from './constants'
import { createLogger } from './log'
export * from './decorators'
@@ -56,9 +55,6 @@ export interface IpcResponse<T> {
* Create and initialize Einf app
*/
export async function createEinf({ window, controllers, injects = [] }: Options) {
if (!checkPackageExists('electron'))
throw new Error('Einf is a electron framework, please install electron first')

await app.whenReady()

const logger = createLogger()

0 comments on commit 72e0933

Please sign in to comment.