From 0f91e8cbc7c0eaa35dcbd581d16a10afd8b71d6b Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Fri, 1 Nov 2024 10:35:46 -0500 Subject: [PATCH] Updated scripts and docs --- CONTRIBUTING.md | 5 ++++- package.json | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1f10a40..b74b2dae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,6 +44,9 @@ To run using `vscode` debugger: 4. You should see the tests start and `vscode` stop at the breakpoint. +## VSCE +[vsce](https://github.com/microsoft/vscode-vsce), short for "Visual Studio Code Extensions", is a command-line tool for packaging, publishing and managing VS Code extensions. The Deephaven extension calls `vsce` via npm scripts. Note that `vsce package` and `vsce publish` both call the `vscode:prepublish` script. + ## Installation from .VSIX This extension can also be installed directly from a `.vsix`. To get a `.vsix`, you can either: @@ -52,7 +55,7 @@ Download one from the [releases/](releases/) folder. or -Build a .vsix locally via `npm run package:latest` +Build a .vsix locally via `npm run package:latest` (see [VSCE](#vsce) section) Then install in vscode: ![Install Deephaven in VS Code](docs/install.png) diff --git a/package.json b/package.json index 2f91d06f..35681dff 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "check:types": "npm run clean && tsc --build ./tsconfig.json && tsc -p tsconfig.unit.json --noEmit --module preserve --moduleResolution bundler && tsc -p e2e/tsconfig.json --noEmit --skipLibCheck", "clean": "rm -rf out packages/*/tsconfig.tsbuildinfo", "compile": "npm run check:types && node scripts/esbuild.js", + "compile:prod": "npm run check:types && npm run test:lint && node scripts/esbuild.js --production", "icon:gen": "node icons/generate.mjs", "package:latest": "vsce package -o releases/vscode-deephaven-latest.vsix", "publish:prerelease": "vsce publish --pre-release", @@ -45,7 +46,7 @@ "test:lint": "eslint . --ext ts", "test:unit": "vitest --reporter=default --reporter=junit --outputFile=./test-reports/vitest.junit.xml", "test": "npm run test:unit", - "vscode:prepublish": "npm run check:types && npm run test:lint && node scripts/esbuild.js --production", + "vscode:prepublish": "compile:prod", "watch:esbuild": "node scripts/esbuild.js --watch", "watch:tsc": "npm run clean && tsc --build ./tsconfig.json --watch", "watch": "npm-run-all -p watch:*"