only call yarn gulp node when needed

This commit is contained in:
Martin Aeschlimann
2022-01-21 15:15:12 +01:00
parent 3640c1a425
commit d46ed36951
5 changed files with 24 additions and 11 deletions

View File

@@ -12,11 +12,15 @@ set VSCODE_DEV=1
:: Sync built-in extensions
call yarn download-builtin-extensions
:: Download nodejs executable for remote
call yarn gulp node
:: 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
)
:: Launch Server
FOR /F "tokens=*" %%g IN ('node build/lib/node.js') do (SET NODE=%%g)
call "%NODE%" scripts\code-server.js %*
popd

View File

@@ -31,6 +31,7 @@ if (args.help) {
'./scripts/code-server.sh|bat [options]\n' +
' --launch Opens a browser'
);
// more help options will be printed by startServer
}
const serverArgs = process.argv.slice(2).filter(v => v !== '--launch');

View File

@@ -13,10 +13,11 @@ function code() {
# Sync built-in extensions
yarn download-builtin-extensions
# Load remote node
yarn gulp node
NODE=$(node build/lib/node.js)
if [ ! -e $NODE ];then
# Load remote node
yarn gulp node
fi
NODE_ENV=development \
VSCODE_DEV=1 \

View File

@@ -8,11 +8,15 @@ pushd %~dp0\..
:: Sync built-in extensions
call yarn download-builtin-extensions
:: Download nodejs executable for remote
call yarn gulp node
:: 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
)
:: Launch Server
FOR /F "tokens=*" %%g IN ('node build/lib/node.js') do (SET NODE=%%g)
call "%NODE%" scripts\code-web.js %*
popd

View File

@@ -13,8 +13,11 @@ function code() {
# Sync built-in extensions
yarn download-builtin-extensions
# Load remote node
yarn gulp node
NODE=$(node build/lib/node.js)
if [ ! -e $NODE ];then
# Load remote node
yarn gulp node
fi
NODE=$(node build/lib/node.js)