Compare commits
7 Commits
jtran/json
...
pierremtb/
Author | SHA1 | Date | |
---|---|---|---|
6e0967fe03 | |||
c276b2fb6f | |||
b9b357f512 | |||
b6778937f5 | |||
de8e931ae8 | |||
89f39b6b14 | |||
35ae29c04e |
Binary file not shown.
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
@ -1,53 +0,0 @@
|
|||||||
import type { ForgeConfig } from '@electron-forge/shared-types'
|
|
||||||
import { VitePlugin } from '@electron-forge/plugin-vite'
|
|
||||||
import { FusesPlugin } from '@electron-forge/plugin-fuses'
|
|
||||||
import { FuseV1Options, FuseVersion } from '@electron/fuses'
|
|
||||||
import path from 'path'
|
|
||||||
|
|
||||||
const rootDir = process.cwd()
|
|
||||||
|
|
||||||
const config: ForgeConfig = {
|
|
||||||
packagerConfig: {
|
|
||||||
asar: true,
|
|
||||||
executableName: 'zoo-modeling-app',
|
|
||||||
icon: path.resolve(rootDir, 'assets', 'icon'),
|
|
||||||
},
|
|
||||||
rebuildConfig: {},
|
|
||||||
makers: [],
|
|
||||||
plugins: [
|
|
||||||
new VitePlugin({
|
|
||||||
// `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
|
|
||||||
// If you are familiar with Vite configuration, it will look really familiar.
|
|
||||||
build: [
|
|
||||||
{
|
|
||||||
// `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`.
|
|
||||||
entry: 'src/main.ts',
|
|
||||||
config: 'vite.main.config.ts',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
entry: 'src/preload.ts',
|
|
||||||
config: 'vite.preload.config.ts',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
renderer: [
|
|
||||||
{
|
|
||||||
name: 'main_window',
|
|
||||||
config: 'vite.renderer.config.ts',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
// Fuses are used to enable/disable various Electron functionality
|
|
||||||
// at package time, before code signing the application
|
|
||||||
new FusesPlugin({
|
|
||||||
version: FuseVersion.V1,
|
|
||||||
[FuseV1Options.RunAsNode]: false,
|
|
||||||
[FuseV1Options.EnableCookieEncryption]: true,
|
|
||||||
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
|
|
||||||
[FuseV1Options.EnableNodeCliInspectArguments]: false,
|
|
||||||
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
|
|
||||||
[FuseV1Options.OnlyLoadAppFromAsar]: true,
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
@ -75,7 +75,7 @@
|
|||||||
"install:wasm-pack:sh": ". $HOME/.cargo/env && curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f",
|
"install:wasm-pack:sh": ". $HOME/.cargo/env && curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f",
|
||||||
"install:wasm-pack:cargo": "cargo install wasm-pack",
|
"install:wasm-pack:cargo": "cargo install wasm-pack",
|
||||||
"install:tools:windows": "winget install jqlang.jq MikeFarah.yq GitHub.cli",
|
"install:tools:windows": "winget install jqlang.jq MikeFarah.yq GitHub.cli",
|
||||||
"start": "vite --port=3000 --host=0.0.0.0",
|
"start": "vite --port=3000 --host=0.0.0.0 --open",
|
||||||
"start:prod": "vite preview --port=3000",
|
"start:prod": "vite preview --port=3000",
|
||||||
"serve": "vite serve --port=3000",
|
"serve": "vite serve --port=3000",
|
||||||
"build": "yarn install:rust && . $HOME/.cargo/env && yarn install:wasm-pack:sh && yarn build:wasm && vite build",
|
"build": "yarn install:rust && . $HOME/.cargo/env && yarn install:wasm-pack:sh && yarn build:wasm && vite build",
|
||||||
@ -109,7 +109,7 @@
|
|||||||
"make:dev": "make dev",
|
"make:dev": "make dev",
|
||||||
"generate:machine-api": "npx openapi-typescript ./openapi/machine-api.json -o src/lib/machine-api.d.ts",
|
"generate:machine-api": "npx openapi-typescript ./openapi/machine-api.json -o src/lib/machine-api.d.ts",
|
||||||
"generate:samples-manifest": "cd public/kcl-samples && node generate-manifest.js",
|
"generate:samples-manifest": "cd public/kcl-samples && node generate-manifest.js",
|
||||||
"tron:start": "electron-forge start",
|
"tron:start": "vite --port 5173 & NODE_ENV=development electron .",
|
||||||
"chrome:test": "PLATFORM=web NODE_ENV=development yarn playwright test --config=playwright.config.ts --project='Google Chrome' --grep-invert='@snapshot'",
|
"chrome:test": "PLATFORM=web NODE_ENV=development yarn playwright test --config=playwright.config.ts --project='Google Chrome' --grep-invert='@snapshot'",
|
||||||
"tronb:vite:dev": "vite build -c vite.main.config.ts -m development && vite build -c vite.preload.config.ts -m development && vite build -c vite.renderer.config.ts -m development",
|
"tronb:vite:dev": "vite build -c vite.main.config.ts -m development && vite build -c vite.preload.config.ts -m development && vite build -c vite.renderer.config.ts -m development",
|
||||||
"tronb:vite:prod": "vite build -c vite.main.config.ts && vite build -c vite.preload.config.ts && vite build -c vite.renderer.config.ts",
|
"tronb:vite:prod": "vite build -c vite.main.config.ts && vite build -c vite.preload.config.ts && vite build -c vite.renderer.config.ts",
|
||||||
@ -153,9 +153,6 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
||||||
"@babel/preset-env": "^7.26.9",
|
"@babel/preset-env": "^7.26.9",
|
||||||
"@electron-forge/cli": "^7.7.0",
|
|
||||||
"@electron-forge/plugin-fuses": "^7.7.0",
|
|
||||||
"@electron-forge/plugin-vite": "^7.7.0",
|
|
||||||
"@electron/fuses": "^1.8.0",
|
"@electron/fuses": "^1.8.0",
|
||||||
"@electron/notarize": "^2.5.0",
|
"@electron/notarize": "^2.5.0",
|
||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
|
@ -457,7 +457,7 @@ const getProjectPathAtStartup = async (
|
|||||||
// If we are in development mode, we don't want to load a project at
|
// If we are in development mode, we don't want to load a project at
|
||||||
// startup.
|
// startup.
|
||||||
// Since the args passed are always '.'
|
// Since the args passed are always '.'
|
||||||
// aka Forge for yarn tron:start live dev or playwright tests, but not dev packaged apps
|
// aka electron live dev or playwright tests, but not dev packaged apps
|
||||||
if (MAIN_WINDOW_VITE_DEV_SERVER_URL || IS_PLAYWRIGHT) {
|
if (MAIN_WINDOW_VITE_DEV_SERVER_URL || IS_PLAYWRIGHT) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import { lezer } from '@lezer/generator/rollup'
|
|||||||
|
|
||||||
const config = defineConfig({
|
const config = defineConfig({
|
||||||
server: {
|
server: {
|
||||||
open: true,
|
open: false,
|
||||||
port: 3000,
|
port: 3000,
|
||||||
watch: {
|
watch: {
|
||||||
ignored: [
|
ignored: [
|
||||||
|
Reference in New Issue
Block a user