Skip to content

Commit 90ea3fd

Browse files
committed
bump and update to latest theia
Signed-off-by: Uni Sayo <[email protected]>
1 parent a1a0267 commit 90ea3fd

File tree

8 files changed

+1508
-1131
lines changed

8 files changed

+1508
-1131
lines changed

.gitpod

Lines changed: 0 additions & 8 deletions
This file was deleted.

.gitpod.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ports:
2+
- port: 3000
3+
tasks:
4+
- init: "yarn install && yarn rebuild:browser"
5+
command: "cd browser-app; yarn start --hostname 0.0.0.0"

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
dist: xenial
2+
sudo: required
3+
language: node_js
4+
node_js:
5+
- '8'
6+
- '10'
7+
git:
8+
depth: 1
9+
cache:
10+
yarn: true
11+
directories:
12+
- node_modules
13+
branches:
14+
only:
15+
- master
16+
install:
17+
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.2.1
18+
- export PATH=$HOME/.yarn/bin:$PATH ;
19+
script:
20+
- yarn

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"private": true,
33
"scripts": {
44
"prepare": "lerna run prepare",
5+
"postinstall": "lerna run postinstall",
56
"rebuild:browser": "theia rebuild:browser",
67
"rebuild:electron": "theia rebuild:electron",
78
"publish:latest": "lerna publish --registry=https://registry.npmjs.org/ --exact --skip-git",

theia-vue-extension/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"@devpodio/vue-language-server": "^0.1.0",
1919
"@theia/core": "next",
2020
"@theia/languages": "next",
21-
"@theia/monaco": "next"
21+
"@theia/monaco": "next",
22+
"@theia/process": "next"
2223
},
2324
"devDependencies": {
2425
"rimraf": "latest",

theia-vue-extension/src/node/vue-contribution.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,35 @@
1717
import { injectable } from "inversify";
1818
import { IConnection, BaseLanguageServerContribution } from "@theia/languages/lib/node";
1919
import { VUE_LANGUAGE_ID, VUE_LANGUAGE_NAME } from '../common';
20-
import { resolve } from 'path';
20+
import { SpawnOptions } from 'child_process';
21+
import { ProcessErrorEvent } from '@theia/process/lib/node/process';
2122

2223
@injectable()
2324
export class VueContribution extends BaseLanguageServerContribution {
2425

2526
readonly id = VUE_LANGUAGE_ID;
2627
readonly name = VUE_LANGUAGE_NAME;
2728

28-
start(clientConnection: IConnection): void {
29+
async start(clientConnection: IConnection): Promise<void> {
2930
const command = 'node';
3031
const args: string[] = [
31-
resolve(__dirname, 'vue-starter'),
32+
__dirname + "/vue-starter.js",
3233
'--stdio'
3334
];
3435
try {
35-
const serverConnection = this.createProcessStreamConnection(command, args);
36-
serverConnection.reader.onError(err => {
37-
console.log(err)
38-
})
36+
const serverConnection = await this.createProcessStreamConnectionAsync(command, args, this.getSpawnOptions());
3937
this.forward(clientConnection, serverConnection);
4038
} catch (e) {
4139
console.log(e);
4240
throw e;
4341
}
4442
}
45-
protected onDidFailSpawnProcess(error: Error): void {
43+
protected getSpawnOptions(): SpawnOptions | undefined {
44+
return undefined;
45+
}
46+
47+
protected onDidFailSpawnProcess(error: ProcessErrorEvent): void {
4648
super.onDidFailSpawnProcess(error);
47-
console.error("Error starting vue language server.");
49+
console.error("Error starting Vue language server.");
4850
}
4951
}

theia-vue-extension/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
],
1616
"sourceMap": true,
1717
"rootDir": "src",
18-
"outDir": "lib"
18+
"outDir": "lib",
19+
"declaration": true,
20+
"declarationMap": true
1921
},
2022
"include": [
2123
"src"

0 commit comments

Comments
 (0)