Skip to content

Commit dbcce20

Browse files
authored
Merge pull request #411 from compnerd/packaging
Packaging Improvements
2 parents bc8d336 + 001cad8 commit dbcce20

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

Editors/vscode/.vscodeignore

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
.vscode/**
2-
.vscode-test/**
3-
out/test/**
4-
out/**/*.map
5-
src/**
1+
**/*.ts
2+
**/tsconfig.json
63
.gitignore
7-
tsconfig.json
8-
vsc-extension-quickstart.md
9-
tslint.json
4+
.vscode/
5+
.vscode-test/
6+
node_modules/

Editors/vscode/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ The following commands build the extension and creates a `.vsix` package in the
1919

2020
```
2121
$ cd Editors/vscode
22-
$ npm run createDevPackage
22+
$ npm install
23+
$ npm run dev-package
2324
```
2425

2526
You can install the package from the command-line using the `code` command if available (see [Launching from the command line](https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line)).
2627

2728
```
28-
code --install-extension out/sourcekit-lsp-vscode-dev.vsix
29+
code --install-extension sourcekit-lsp-development.vsix
2930
```
3031

3132
Or you can install from within the application using the `Extensions > Install from VSIX...` command from the command palette.

Editors/vscode/package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editors/vscode/package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,22 @@
1919
"onLanguage:objective-c",
2020
"onLanguage:objective-cpp"
2121
],
22-
"main": "./out/extension",
22+
"main": "./out/main",
2323
"scripts": {
24-
"vscode:prepublish": "npm run compile",
25-
"compile": "tsc -p ./",
26-
"watch": "tsc -watch -p ./",
27-
"createDevPackage": "npm install && ./node_modules/.bin/vsce package -o ./out/sourcekit-lsp-vscode-dev.vsix"
24+
"vscode:prepublish": "npm run -S esbuild-base -- --minify",
25+
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
26+
"esbuild": "npm run -S esbuild-base -- --sourcemap",
27+
"esbuild-watch": "npm run -S esbuild-base -- --sourcemap --watch",
28+
"package": "vsce package",
29+
"dev-package": "vsce package -o sourcekit-lsp-development.vsix"
2830
},
2931
"dependencies": {
3032
"vscode-languageclient": "^7.0.0"
3133
},
3234
"devDependencies": {
3335
"@types/node": "^14.14.13",
3436
"@types/vscode": "^1.52.0",
37+
"esbuild": "^0.12.9",
3538
"typescript": "^4.1.3",
3639
"vsce": "^1.81.1"
3740
},

0 commit comments

Comments
 (0)