diff --git a/.gitignore b/.gitignore index ad887b7e2..0185b4e49 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Visual Studio Code /.vscode !/.vscode/extensions.json +!/.vscode/launch.json # Intelij-IDEA /.idea diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..84ce98609 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,20 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch PNPM Debug Script", + "skipFiles": [ + "/**" + ], + "runtimeExecutable": "pnpm", + "runtimeArgs": [ + "run", "debug" + ] + } + ] +} diff --git a/package.json b/package.json index 1d20b1f39..7e5073be5 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,8 @@ "dev": "pnpm node ./scripts/dev.js", "dev:staging": "NODE_OPTIONS=--max_old_space_size=3072 NODE_ENV=development pnpm run build && pnpm run start", "lint": "pnpm -r --parallel run lint", + "debug": "pnpm run build:debug && pnpm run start", + "build:debug": "pnpm -r --parallel run build:debug && pnpm run gulp", "cy:open": "cypress open --browser --e2e --config-file=cypress.config.ts", "cy:run": "cypress run", "e2e": "start-server-and-test start:test http://localhost:61812 cy:run", diff --git a/packages/backend/native-utils/package.json b/packages/backend/native-utils/package.json index 962b4bc4c..93a6497f5 100644 --- a/packages/backend/native-utils/package.json +++ b/packages/backend/native-utils/package.json @@ -37,7 +37,7 @@ "build": "pnpm run build:napi && pnpm run build:migration", "build:napi": "napi build --features napi --platform --release ./built/", "build:migration": "cargo build --locked --release --manifest-path ./migration/Cargo.toml && cp ./target/release/migration ./built/migration", - "build:debug": "napi build --platform ./built/ && cargo build --manifest-path ./migration/Cargo.toml", + "build:debug": "napi build --features napi --platform ./built/ && cargo build --locked --manifest-path ./migration/Cargo.toml && cp -v ./target/debug/migration ./built/migration", "prepublishOnly": "napi prepublish -t npm", "test": "pnpm run cargo:test && pnpm run build:napi && ava", "universal": "napi universal", diff --git a/packages/backend/package.json b/packages/backend/package.json index cc8f4747e..9288ed92f 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -14,6 +14,7 @@ "revertmigration:cargo": "./native-utils/built/migration down", "check:connect": "node ./check_connect.js", "build": "pnpm swc src -d built -D", + "build:debug": "pnpm swc src -d built -s -D", "watch": "pnpm swc src -d built -D -w", "lint": "pnpm rome check --apply *", "mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha", diff --git a/packages/client/package.json b/packages/client/package.json index 43983c460..a2ee694d7 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -4,6 +4,7 @@ "scripts": { "watch": "pnpm vite build --watch --mode development", "build": "pnpm vite build", + "build:debug": "pnpm run build", "lint": "pnpm rome check **/*.ts --apply && pnpm run lint:vue", "lint:vue": "pnpm paralint --ext .vue --fix '**/*.vue' --cache", "format": "pnpm rome format * --write && pnpm prettier --write '**/*.{scss,vue}' --cache --cache-strategy metadata" diff --git a/packages/firefish-js/package.json b/packages/firefish-js/package.json index bcee95176..7cdd419ec 100644 --- a/packages/firefish-js/package.json +++ b/packages/firefish-js/package.json @@ -6,6 +6,7 @@ "types": "./built/index.d.ts", "scripts": { "build": "pnpm swc src -d built -D", + "build:debug": "pnpm swc src -d built -s -D", "render": "pnpm run build && pnpm run api && pnpm run api-prod && cp temp/firefish-js.api.json etc/ && pnpm run api-doc", "tsd": "tsc && tsd", "api": "pnpm api-extractor run --local --verbose", diff --git a/packages/megalodon/package.json b/packages/megalodon/package.json index dea59b579..e9e30abe1 100644 --- a/packages/megalodon/package.json +++ b/packages/megalodon/package.json @@ -5,6 +5,7 @@ "typings": "./lib/src/index.d.ts", "scripts": { "build": "tsc -p ./", + "build:debug": "pnpm run build", "lint": "pnpm rome check **/*.ts --apply", "format": "pnpm rome format --write src/**/*.ts", "doc": "typedoc --out ../docs ./src", diff --git a/packages/sw/package.json b/packages/sw/package.json index c86c15ead..6118e249a 100644 --- a/packages/sw/package.json +++ b/packages/sw/package.json @@ -3,6 +3,7 @@ "private": true, "scripts": { "build": "webpack", + "build:debug": "pnpm run build", "watch": "pnpm swc src -d built -D -w", "lint": "pnpm rome check **/*.ts --apply", "format": "pnpm rome format * --write"