Skip to content

Commit

Permalink
fix: bundle extension using tsup (#268)
Browse files Browse the repository at this point in the history
* fix: bundle extension using tsup

closes #267

* deps
  • Loading branch information
amrbashir authored Sep 2, 2024
1 parent e9c0de4 commit c64d572
Show file tree
Hide file tree
Showing 9 changed files with 1,100 additions and 41 deletions.
5 changes: 5 additions & 0 deletions .changes/bundle-tsup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tauri-vscode': patch
---

Fix extension failing to active due missing dependencies
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
npm-debug.log
Thumbs.db
node_modules/
out/
dist/
.vs/
.vscode-test/
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
]
Expand Down
4 changes: 1 addition & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"script": "compile",
"presentation": {
"reveal": "never"
},
Expand Down
6 changes: 5 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

.vscode/**
.vscode-test/**
out/test/**
dist/test/**
src/**
.gitignore
vsc-extension-quickstart.md
**/tsconfig.json
**/*.map
**/*.ts
.changes
.github
renovate.json
.prettierrc
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"workspaceContains:**/tauri.*.conf.json5",
"onFileSystem:tauri"
],
"main": "./out/extension.js",
"main": "./dist/extension.js",
"contributes": {
"jsonValidation": [
{
Expand Down Expand Up @@ -82,20 +82,19 @@
},
"scripts": {
"vscode:prepublish": "pnpm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"compile": "tsup src/extension.ts --clean --format cjs --external vscode",
"watch": "pnpm run compile --watch",
"format": "prettier ./**/*.{json,ts,js} -w --ignore-path .gitignore"
},
"dependencies": {
"devDependencies": {
"axios": "1.7.7",
"glob": "11.0.0",
"run-in-terminal": "0.0.3",
"strip-ansi": "7.1.0"
},
"devDependencies": {
"strip-ansi": "7.1.0",
"@types/node": "18.19.31",
"@types/vscode": "1.75.0",
"prettier": "3.3.3",
"tsup": "^8.2.4",
"typescript": "5.5.4"
},
"packageManager": "[email protected]"
Expand Down
Loading

0 comments on commit c64d572

Please sign in to comment.