From 691a4350444693290da2b06ef6810d333928414d Mon Sep 17 00:00:00 2001 From: lucsomers Date: Tue, 30 Jan 2024 13:16:26 +0100 Subject: [PATCH] testing esbuild bundle setup --- .devcontainer/startup.sh | 2 ++ package.json | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.devcontainer/startup.sh b/.devcontainer/startup.sh index 96d8843..2e6e1a7 100644 --- a/.devcontainer/startup.sh +++ b/.devcontainer/startup.sh @@ -4,8 +4,10 @@ npm install npm install --global @vscode/vsce npm install --global typescript npm install @types/node +npm i --global esbuild git restore . +npm run esbuild vsce package 0.0.0 code --install-extension language-ampersand-0.0.0.vsix \ No newline at end of file diff --git a/package.json b/package.json index 5ae757c..8c9bf3f 100644 --- a/package.json +++ b/package.json @@ -162,11 +162,15 @@ } }, "scripts": { - "vscode:prepublish": "npm run compile", + "vscode:prepublish": "npm run esbuild-base -- --minify", "compile": "tsc -p ./", + "test-compile": "tsc -p ./", "watch": "tsc -watch -p ./", "package": "vsce package", - "publish": "vsce publish" + "publish": "vsce publish", + "esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node", + "esbuild": "npm run esbuild-base -- --sourcemap", + "esbuild-watch": "npm run esbuild-base -- --sourcemap --watch" }, "dependencies": { "@types/node": "ts5.1",