Skip to content

Commit a78545c

Browse files
committed
Add npm run reinstall script and update docs to use it
1 parent b9dfaf9 commit a78545c

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

CLAUDE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ VSCode extension that makes git-crypt repositories work in the Source Control pa
77
## Key Commands
88

99
```bash
10-
npm run build # Build with esbuild (bundles to dist/extension.js)
11-
npm run watch # Build on file change
12-
npm test # Run unit tests (node:test + tsx)
13-
npm run package # Create .vsix package
10+
npm run build # Build with esbuild (bundles to dist/extension.js)
11+
npm run watch # Build on file change
12+
npm test # Run unit tests (node:test + tsx)
13+
npm run package # Create .vsix package
14+
npm run reinstall # Clean, package, and install the extension locally
1415
```
1516

1617
## Architecture
@@ -58,7 +59,6 @@ Branches: `main` (releases), `dev` (CI runs tests + dry-run builds, no publish).
5859

5960
Build and install a local VSIX:
6061
```bash
61-
npm run package
62-
code --install-extension git-crypt-vscode-*.vsix
62+
npm run reinstall
6363
```
6464
Reload VSCode to pick up changes.

CONTRIBUTING.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@
55
```bash
66
git clone https://github.com/j-256/git-crypt-vscode.git && cd git-crypt-vscode
77
npm install
8-
npm run package
9-
code --install-extension git-crypt-vscode-*.vsix
8+
npm run reinstall
109
```
1110

11+
Reload VSCode to pick up changes.
12+
1213
## Commands
1314

1415
```bash
15-
npm run build # Build once (esbuild -> dist/extension.js)
16-
npm run watch # Build on change
17-
npm test # Run unit tests (node:test + tsx)
18-
npm run package # Create .vsix
16+
npm run build # Build once (esbuild -> dist/extension.js)
17+
npm run watch # Build on change
18+
npm test # Run unit tests (node:test + tsx)
19+
npm run package # Create .vsix
20+
npm run reinstall # Clean, package, and install the extension locally
1921
```
2022

2123
## Testing

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"watch": "node esbuild.js --watch",
4545
"test": "node --import tsx --test test/*.test.ts",
4646
"package": "vsce package",
47-
"publish": "vsce publish"
47+
"publish": "vsce publish",
48+
"reinstall": "rm -f *.vsix && npm run package && code --install-extension git-crypt-vscode-*.vsix"
4849
},
4950
"devDependencies": {
5051
"@types/vscode": "^1.85.0",

0 commit comments

Comments
 (0)