feat: add support VSCode launch.json (fixes #182)
This commit is contained in:
1 parent
4efdf33db9
commit
df829d199c
4 files changed
+40
-3
No files matched your search
Vendored
+32
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"version": "1.0.0",
|
||||||
|
"compounds": [
|
||||||
|
{
|
||||||
|
"name": "Debug Run",
|
||||||
|
"configurations": [
|
||||||
|
"Debug App"
|
||||||
|
],
|
||||||
|
"presentation": {
|
||||||
|
"hidden": false,
|
||||||
|
"group": "",
|
||||||
|
"order": 1
|
||||||
|
},
|
||||||
|
"stopAll": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Debug App",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "node",
|
||||||
|
"timeout": 60000,
|
||||||
|
"runtimeArgs": [
|
||||||
|
"run-script",
|
||||||
|
"dev"
|
||||||
|
],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"runtimeExecutable": "npm",
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"workbench.settings.useSplitJSON": true,
|
"workbench.settings.useSplitJSON": true,
|
||||||
"eslint.codeActionsOnSave.rules": null,
|
"eslint.codeActionsOnSave.rules": null,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": true
|
"source.fixAll.eslint": "explicit"
|
||||||
},
|
},
|
||||||
"eslint.validate": [
|
"eslint.validate": [
|
||||||
"javascript"
|
"javascript"
|
||||||
|
|||||||
@@ -15,6 +15,11 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/jooy2/vutron/issues"
|
"url": "https://github.com/jooy2/vutron/issues"
|
||||||
},
|
},
|
||||||
|
"debug": {
|
||||||
|
"env": {
|
||||||
|
"VITE_DEV_SERVER_URL": "http://localhost:5173"
|
||||||
|
}
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"dev:debug": "vite -d",
|
"dev:debug": "vite -d",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { join, dirname } from 'path'
|
import { join, dirname } from 'path'
|
||||||
import { name, version } from '../../../package.json'
|
import { name, version, debug } from '../../../package.json'
|
||||||
import { fileURLToPath } from 'url'
|
import { fileURLToPath } from 'url'
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||||
@@ -21,6 +21,6 @@ export default class Constants {
|
|||||||
preload: join(__dirname, '../preload/index.js')
|
preload: join(__dirname, '../preload/index.js')
|
||||||
}
|
}
|
||||||
|
|
||||||
static APP_INDEX_URL_DEV = 'http://localhost:5173/index.html'
|
static APP_INDEX_URL_DEV = `${debug.env.VITE_DEV_SERVER_URL}/index.html`
|
||||||
static APP_INDEX_URL_PROD = join(__dirname, '../index.html')
|
static APP_INDEX_URL_PROD = join(__dirname, '../index.html')
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user