vscode/scripts/code-server.bat

32 lines
514 B
Batchfile
Raw Normal View History

2021-10-20 16:42:13 +00:00
@echo off
setlocal
title VSCode Server
2021-10-20 16:42:13 +00:00
set ROOT_DIR=%~dp0..
pushd %ROOT_DIR%
2021-10-20 16:42:13 +00:00
:: Configuration
set NODE_ENV=development
set VSCODE_DEV=1
:: Get electron, compile, built-in extensions
if "%VSCODE_SKIP_PRELAUNCH%"=="" node build/lib/preLaunch.js
2021-10-20 16:42:13 +00:00
2022-01-21 14:15:12 +00:00
:: Node executable
FOR /F "tokens=*" %%g IN ('node build/lib/node.js') do (SET NODE=%%g)
if not exist "%NODE%" (
:: Download nodejs executable for remote
call yarn gulp node
)
2021-10-20 16:42:13 +00:00
popd
2021-10-20 16:42:13 +00:00
:: Launch Server
call "%NODE%" %ROOT_DIR%\scripts\code-server.js %*
2021-10-20 16:42:13 +00:00
endlocal