Skip to content

Commit 69f059e

Browse files
authored
Reduce the size of the installation package (#135)
1 parent 99e8528 commit 69f059e

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.vscodeignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
1+
# Exclude development sources and tests
2+
src/**
3+
ui/src/**
4+
ui/node_modules/**
5+
ui/package.json
6+
ui/package-lock.json
7+
src/test/**
8+
dist/test/**
9+
**/*.test.*
10+
**/*.spec.*
11+
12+
# Exclude maps and TypeScript sources from package
13+
**/*.map
14+
**/*.ts
15+
**/*.tsx
16+
17+
# Exclude build configs and project metadata not needed at runtime
18+
.eslintrc*
19+
.eslint*
20+
.prettier*
21+
*.code-workspace
22+
.vscode/**
23+
.vscode-test/**
24+
.git/**
25+
.gitignore
26+
.gitmodules
27+
.npmrc
28+
.github/**
29+
.nyc_output/**
30+
coverage/**
31+
32+
# Exclude local artifacts
33+
*.vsix
34+
*.log
35+
npm-debug.log*
36+
yarn-error.log*
37+
38+
# Keep only runtime bundles and assets
39+
!dist/**
40+
!ui/dist/**
41+
!resources/**
42+
!llama.png
43+
!package.json
44+
!README.md
45+
!LICENSE
46+
47+
# Exclude production dependencies (we bundle the extension code)
48+
node_modules/**
149
# Exclude VCS and workspace config
250
.git/**
351
.github/**

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,6 +1983,8 @@
19831983
"postinstall": "npm run build-ui",
19841984
"test": "node ./dist/test/runTest.js",
19851985
"compile": "tsc -p ./",
1986+
"bundle": "esbuild src/extension.ts --bundle --platform=node --format=cjs --external:vscode --outfile=dist/extension.js --minify",
1987+
"vscode:prepublish": "npm run bundle",
19861988
"lint": "eslint --ext .ts,.tsx .",
19871989
"format": "prettier --write --ignore-path .gitignore '**/*'"
19881990
},
@@ -2004,6 +2006,7 @@
20042006
"@types/picomatch": "^4.0.0",
20052007
"@types/vscode": "^1.100.0",
20062008
"@vscode/test-electron": "^2.5.2",
2009+
"esbuild": "^0.24.0",
20072010
"glob": "^11.0.3",
20082011
"mocha": "^11.7.4",
20092012
"typescript": "^4.8.0",

0 commit comments

Comments
 (0)