vscode/scripts/code.bat

43 lines
1 KiB
Batchfile
Raw Normal View History

2015-11-13 14:39:38 +01:00
@echo off
setlocal
2015-11-13 14:39:38 +01:00
title VSCode Dev
2015-11-26 09:29:43 +01:00
pushd %~dp0\..
:: Node modules
2017-11-16 10:47:02 +01:00
if not exist node_modules call yarn
2015-11-26 09:29:43 +01:00
2016-08-09 17:11:07 +02:00
for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a
set NAMESHORT=%NAMESHORT: "=%
set NAMESHORT=%NAMESHORT:"=%.exe
set CODE=".build\electron\%NAMESHORT%"
2017-11-16 14:43:41 +01:00
:: Download Electron if needed
node build\lib\electron.js
if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron
2015-11-26 09:29:43 +01:00
:: Get built-in extensions
node build\lib\builtInExtensions.js || .\node_modules\.bin\gulp builtInExtensions
2015-11-26 10:07:11 +01:00
:: Build
if not exist out node .\node_modules\gulp\bin\gulp.js compile
2015-11-26 09:29:43 +01:00
:: Configuration
2015-11-13 14:39:38 +01:00
set NODE_ENV=development
set VSCODE_DEV=1
set VSCODE_CLI=1
set ELECTRON_DEFAULT_ERROR_MODE=1
2015-11-13 14:39:38 +01:00
set ELECTRON_ENABLE_LOGGING=1
set ELECTRON_ENABLE_STACK_DUMPING=1
2015-11-26 09:29:43 +01:00
:: Launch Code
2017-02-13 17:51:53 +01:00
:: Use the following to get v8 tracing:
:: %CODE% --js-flags="--trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces" . %*
2016-08-09 17:11:07 +02:00
%CODE% . %*
2015-11-13 14:39:38 +01:00
popd
2016-08-09 17:11:07 +02:00
endlocal