File tree Expand file tree Collapse file tree
agents/ls-typescript/src/main/resources/installers/1.0.1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ unset PACKAGES
2626command -v tar > /dev/null 2>&1 || { PACKAGES=${PACKAGES} " tar" ; }
2727command -v curl > /dev/null 2>&1 || { PACKAGES=${PACKAGES} " curl" ; }
2828
29- AGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.typescript.binaries/1.0.1
3029CHE_DIR=$HOME /che
3130LS_DIR=${CHE_DIR} /ls-typescript
3231LS_LAUNCHER=${LS_DIR} /launch.sh
161160# ## Install JS-TS LS ###
162161# #######################
163162
164- curl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR}
163+ # Check if tsserver and typescript-language-server are installed
164+
165+ unset TS_NPMS
166+ command -v tsserver > /dev/null 2>&1 || { TS_NPMS=${TS_NPMS} " typescript" ; }
167+ command -v typescript-language-server > /dev/null 2>&1 || { TS_NPMS=${TS_NPMS} " typescript-language-server" ; }
168+
169+ test " ${TS_NPMS} " = " " || {
170+ ${SUDO} npm install -g ${TS_NPMS} ;
171+ }
165172
166173touch ${LS_LAUNCHER}
167174chmod +x ${LS_LAUNCHER}
168- echo " nodejs ${LS_DIR} /build/ language-server- stdio.js " > ${LS_LAUNCHER}
175+ echo " typescript- language-server -- stdio" > ${LS_LAUNCHER}
You can’t perform that action at this time.
0 commit comments