diff options
author | Martin Aeschlimann <martinae@microsoft.com> | 2022-01-21 17:15:12 +0300 |
---|---|---|
committer | Martin Aeschlimann <martinae@microsoft.com> | 2022-01-21 17:15:12 +0300 |
commit | d46ed369512cc513866870e0f15ecdce473583f4 (patch) | |
tree | 8b27b97fcdafc9a2e38ff0ac29ff6c0f545f2da4 /scripts | |
parent | 3640c1a425713e905f7898917cd15cc077204697 (diff) |
only call yarn gulp node when needed
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/code-server.bat | 10 | ||||
-rw-r--r-- | scripts/code-server.js | 1 | ||||
-rwxr-xr-x | scripts/code-server.sh | 7 | ||||
-rw-r--r-- | scripts/code-web.bat | 10 | ||||
-rwxr-xr-x | scripts/code-web.sh | 7 |
5 files changed, 24 insertions, 11 deletions
diff --git a/scripts/code-server.bat b/scripts/code-server.bat index 549f69aeddd..fd7e8d46028 100644 --- a/scripts/code-server.bat +++ b/scripts/code-server.bat @@ -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 diff --git a/scripts/code-server.js b/scripts/code-server.js index 363c3dd6388..4ee2e88abc8 100644 --- a/scripts/code-server.js +++ b/scripts/code-server.js @@ -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'); diff --git a/scripts/code-server.sh b/scripts/code-server.sh index e932e106b38..6e31e233fa0 100755 --- a/scripts/code-server.sh +++ b/scripts/code-server.sh @@ -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 \ diff --git a/scripts/code-web.bat b/scripts/code-web.bat index 5775eccf3a1..312024c3d42 100644 --- a/scripts/code-web.bat +++ b/scripts/code-web.bat @@ -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 diff --git a/scripts/code-web.sh b/scripts/code-web.sh index fe468f37fb7..19313a61e01 100755 --- a/scripts/code-web.sh +++ b/scripts/code-web.sh @@ -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) |