feat: add support VSCode launch.json (fixes #182)

This commit is contained in:
leejooy96 committed 2024-12-24 09:50:02 +09:00
1 parent 4efdf33db9
commit df829d199c
4 files changed
+40 -3

No files matched your search

+32
View File
@@ -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"
}
]
}
+1 -1
View File
@@ -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"
+5
View File
@@ -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",
+2 -2
View File
@@ -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')
} }