Skip to content

Commit 9aa789c

Browse files
committed
(GH-116) Fix packaging to conform with vsce workflow
Previously the gulp file could be used to package the extension however that is not how the VS Code Extension tool workflow operates (vsce). This commit changes the tool chain so that vsce calls the gulpfile during pre-publish to ensure the language server is updated prior to packaging.
1 parent 7e18fed commit 9aa789c

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

appveyor.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.0.4-appv.{build}
1+
version: 0.7.0-appv.{build}
22
clone_depth: 10
33
init:
44
- SET
@@ -32,7 +32,7 @@ environment:
3232
# Package it up to a VSIX
3333
- nodejs_version: "7.4.0"
3434
nodejs_arch: "x64"
35-
GULP_BUILD_TASK: build
35+
VSCE_TASK: package
3636

3737
matrix:
3838
fast_finish: true
@@ -75,6 +75,9 @@ install:
7575
Write-Host "npm Version..."
7676
& npm --version
7777
78+
Write-Host "Installing VSCE globally..."
79+
& npm install -g vsce --silent
80+
7881
Write-Host "Installing modules..."
7982
& npm install --silent
8083
@@ -84,6 +87,7 @@ install:
8487
8588
build_script:
8689
- cmd: IF NOT [%GULP_BUILD_TASK%] == [] node node_modules\gulp\bin\gulp.js %GULP_BUILD_TASK%
90+
- cmd: IF NOT [%VSCE_TASK%] == [] vsce %VSCE_TASK%
8791

8892
test_script:
8993
- cmd: IF NOT [%RAKE_TASK%] == [] bundle exec rake %RAKE_TASK%

client/gulpfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ gulp.task('copy_language_server', function () {
2121
.pipe(gulp.dest('./vendor/languageserver'));
2222
})
2323

24-
gulp.task('build_extension', function (callback) {
25-
exec('node ./node_modules/vsce/out/vsce package',
24+
gulp.task('compile_typescript', function (callback) {
25+
exec('tsc -p ./',
2626
function (err, stdout, stderr) {
2727
console.log(stdout);
2828
console.log(stderr);
@@ -32,7 +32,7 @@ gulp.task('build_extension', function (callback) {
3232

3333

3434
gulp.task('build', function (callback) {
35-
runSequence('clean','copy_language_server','build_extension',callback);
35+
runSequence('clean','copy_language_server','compile_typescript',callback);
3636
})
3737

3838
gulp.task('bump', function () {

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
}
290290
},
291291
"scripts": {
292-
"vscode:prepublish": "tsc -p ./",
292+
"vscode:prepublish": "node node_modules/gulp/bin/gulp.js build",
293293
"compile": "tsc -p ./",
294294
"compile-watch": "tsc -watch -p ./",
295295
"postinstall": "node ./node_modules/vscode/bin/install",

0 commit comments

Comments
 (0)