aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--installer/install-javascript-typescript-langserver.cmd16
-rw-r--r--installer/install-javascript-typescript-langserver.sh20
2 files changed, 36 insertions, 0 deletions
diff --git a/installer/install-javascript-typescript-langserver.cmd b/installer/install-javascript-typescript-langserver.cmd
new file mode 100644
index 0000000..19c5f91
--- /dev/null
+++ b/installer/install-javascript-typescript-langserver.cmd
@@ -0,0 +1,16 @@
+@echo off
+
+cd %~dp0
+if exist "..\servers\javascript-typescript-langserver" rd /S /Q "..\servers\javascript-typescript-langserver"
+md "..\servers\javascript-typescript-langserver"
+cd "..\servers\javascript-typescript-langserver"
+git clone https://github.com/sourcegraph/javascript-typescript-langserver .
+npm install
+npm build
+
+echo @echo off ^
+
+node %%~dp0\lib\language-server-stdio.js ^
+
+> javascript-typescript-langserver.cmd
+
diff --git a/installer/install-javascript-typescript-langserver.sh b/installer/install-javascript-typescript-langserver.sh
new file mode 100644
index 0000000..572a8df
--- /dev/null
+++ b/installer/install-javascript-typescript-langserver.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+[ -d ../servers/javascript-typescript-langserver ] && rm -rf ../servers/javascript-typescript-langserver
+mkdir ../servers/javascript-typescript-langserver
+cd ../servers/javascript-typescript-langserver
+git clone https://github.com/sourcegraph/javascript-typescript-langserver .
+npm install
+npm build
+
+cat <<EOF > javascript-typescript-langserver
+#!/bin/sh
+
+DIR=\$(cd \$(dirname \$0); pwd)
+node \$DIR/lib/language-server-stdio.js
+EOF
+
+chmod +x javascript-typescript-langserver