-
-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to use native ESM in
main
and preload
packages
Merge pull request #967 from cawa-93/ESM
- Loading branch information
Showing
22 changed files
with
120 additions
and
111 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_APP_VERSION=$npm_package_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
directories: | ||
output: dist | ||
buildResources: buildResources | ||
|
||
files: | ||
- packages/**/dist/** | ||
|
||
linux: | ||
target: deb |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
{ | ||
"name": "vite-electron-builder", | ||
"description": "Secure boilerplate for Electron app based on Vite", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"private": true, | ||
"type": "module", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "Alex Kozack", | ||
"url": "https://kozack.me" | ||
}, | ||
"main": "packages/main/dist/index.cjs", | ||
"main": "packages/main/dist/index.js", | ||
"scripts": { | ||
"build": "npm run build:main && npm run build:preload && npm run build:renderer", | ||
"build:main": "cd ./packages/main && vite build", | ||
"build:preload": "cd ./packages/preload && vite build", | ||
"build:renderer": "cd ./packages/renderer && vite build", | ||
"compile": "cross-env MODE=production npm run build && electron-builder build --config .electron-builder.config.js --dir --config.asar=false", | ||
"compile": "cross-env MODE=production npm run build && electron-builder build --config electron-builder.yml --dir --config.asar=false", | ||
"test": "npm run test:main && npm run test:preload && npm run test:renderer && npm run test:e2e", | ||
"test:e2e": "npm run build && vitest run", | ||
"test:main": "vitest run -r packages/main --passWithNoTests", | ||
"test:preload": "vitest run -r packages/preload --passWithNoTests", | ||
"test:renderer": "vitest run -r packages/renderer --passWithNoTests", | ||
"watch": "node scripts/watch.mjs", | ||
"watch": "node scripts/watch.js", | ||
"lint": "eslint . --ext js,mjs,cjs,ts,mts,cts,vue", | ||
"typecheck:main": "tsc --noEmit -p packages/main/tsconfig.json", | ||
"typecheck:preload": "tsc --noEmit -p packages/preload/tsconfig.json", | ||
"typecheck:renderer": "vue-tsc --noEmit -p packages/renderer/tsconfig.json", | ||
"typecheck": "npm run typecheck:main && npm run typecheck:preload && npm run typecheck:renderer", | ||
"postinstall": "cross-env ELECTRON_RUN_AS_NODE=1 electron scripts/update-electron-vendors.mjs", | ||
"postinstall": "cross-env ELECTRON_RUN_AS_NODE=1 electron scripts/update-electron-vendors.js", | ||
"format": "npx prettier --write \"**/*.{js,mjs,cjs,ts,mts,cts,vue,json}\"" | ||
}, | ||
"devDependencies": { | ||
|
@@ -44,7 +45,7 @@ | |
"playwright": "1.41.1", | ||
"simple-git-hooks": "2.9.0", | ||
"typescript": "5.3.3", | ||
"unplugin-auto-expose": "0.2.2", | ||
"unplugin-auto-expose": "0.3.0", | ||
"vite": "5.0.12", | ||
"vitest": "1.2.1", | ||
"vue": "3.3.4", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.