From 0d1963628c7a5f998aeaf1cf63d8abab2e8923ea Mon Sep 17 00:00:00 2001 From: Kirill Dubovitskiy Date: Mon, 7 Aug 2023 00:22:58 -0700 Subject: Using esbuild.mjs for configuration Added example directory with a typescript program and open it by default in the extension host - its nice to have an isolated environment where the extension can be played with. You can always open an actual project folder if you want to --- .vscode/launch.json | 1 + extension/manual-testing-sandbox/example.ts | 3 +++ extension/manual-testing-sandbox/readme.md | 3 +++ extension/package.json | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 extension/manual-testing-sandbox/example.ts create mode 100644 extension/manual-testing-sandbox/readme.md diff --git a/.vscode/launch.json b/.vscode/launch.json index 2c7d1a27..c598750f 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -34,6 +34,7 @@ "request": "launch", "cwd": "${workspaceFolder}/extension", "args": [ + "${workspaceFolder}/extension/manual-testing-sandbox", "--extensionDevelopmentPath=${workspaceFolder}/extension", ], "outFiles": [ diff --git a/extension/manual-testing-sandbox/example.ts b/extension/manual-testing-sandbox/example.ts new file mode 100644 index 00000000..0633beaf --- /dev/null +++ b/extension/manual-testing-sandbox/example.ts @@ -0,0 +1,3 @@ +function mergeSortAlgorithm() { + // TODO: implement +} \ No newline at end of file diff --git a/extension/manual-testing-sandbox/readme.md b/extension/manual-testing-sandbox/readme.md new file mode 100644 index 00000000..5b25d31e --- /dev/null +++ b/extension/manual-testing-sandbox/readme.md @@ -0,0 +1,3 @@ +The sole purpose of this folder is to open it when debugging the extension. +It is not used by the extension itself. +You can add more files that can be useful when manually testing the extension. \ No newline at end of file diff --git a/extension/package.json b/extension/package.json index 5bae8f05..c30b3aa9 100644 --- a/extension/package.json +++ b/extension/package.json @@ -183,8 +183,8 @@ ] }, "scripts": { + "esbuild-base": "rm -rf ./out && node esbuild.mjs", "vscode:prepublish": "npm run esbuild-base -- --minify", - "esbuild-base": "rm -rf ./out && esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node", "esbuild": "npm run esbuild-base -- --sourcemap", "esbuild-watch": "npm run esbuild-base -- --sourcemap --watch", "tsc": "tsc -p ./", -- cgit v1.2.3-70-g09d2