@@ -48,6 +48,7 @@ set lint_js=
4848set lint_cpp =
4949set lint_md =
5050set lint_md_build =
51+ set format_md =
5152set i18n_arg =
5253set download_arg =
5354set build_release =
@@ -122,6 +123,7 @@ if /i "%1"=="lint-md" set lint_md=1&goto arg-ok
122123if /i " %1 " == " lint-md-build" set lint_md_build = 1& goto arg-ok
123124if /i " %1 " == " lint" set lint_cpp = 1& set lint_js=1& set lint_md=1& goto arg-ok
124125if /i " %1 " == " lint-ci" set lint_cpp = 1& set lint_js_ci=1& goto arg-ok
126+ if /i " %1 " == " format-md" set format_md = 1& goto arg-ok
125127if /i " %1 " == " package" set package = 1& goto arg-ok
126128if /i " %1 " == " msi" set msi = 1& set licensertf=1& set download_arg=" --download=all" & set i18n_arg=full-icu& goto arg-ok
127129if /i " %1 " == " build-release" set build_release = 1& set sign=1& goto arg-ok
@@ -180,6 +182,9 @@ if "%target_env%"=="vs2022" set "node_gyp_exe=%node_gyp_exe% --msvs_version=2022
180182:: skip building if the only argument received was lint
181183if " %* " == " lint" if exist " %node_exe% " goto lint-cpp
182184
185+ :: skip building if the only argument received was format-md
186+ if " %* " == " format-md" if exist " %node_exe% " goto format-md
187+
183188if " %config% " == " Debug" set configure_flags = %configure_flags% --debug
184189if defined nosnapshot set configure_flags = %configure_flags% --without-snapshot
185190if defined nonpm set configure_flags = %configure_flags% --without-npm
@@ -653,6 +658,7 @@ if "%ERRORLEVEL%"=="0" set "NODEJS_MAKE=make PYTHON=python" & goto run-make-lint
653658where wsl > NUL 2 >& 1
654659if " %ERRORLEVEL% " == " 0" set " NODEJS_MAKE = wsl make" & goto run-make-lint
655660echo Could not find GNU Make, needed for linting C/C++
661+ echo Alternatively, you can use WSL
656662goto lint-js
657663
658664:run-make-lint
@@ -677,7 +683,7 @@ echo "Deprecated no-op target 'lint_md_build'"
677683goto lint-md
678684
679685:lint-md
680- if not defined lint_md goto exit
686+ if not defined lint_md goto format-md
681687echo Running Markdown linter on docs...
682688SETLOCAL ENABLEDELAYEDEXPANSION
683689set lint_md_files =
@@ -688,10 +694,10 @@ for /D %%D IN (doc\*) do (
688694)
689695%node_exe% tools\lint-md\lint-md.mjs %lint_md_files%
690696ENDLOCAL
691- goto exit
697+ goto format-md
692698
693699:format-md
694- if not defined lint_md goto exit
700+ if not defined format_md goto exit
695701echo Running Markdown formatter on docs...
696702SETLOCAL ENABLEDELAYEDEXPANSION
697703set lint_md_files =
@@ -711,7 +717,7 @@ set exit_code=1
711717goto exit
712718
713719:help
714- echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-internet/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [nonpm] [nocorepack] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2022] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
720+ echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-internet/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [nonpm] [nocorepack] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2022] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [format-md] [ package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
715721echo Examples:
716722echo vcbuild.bat : builds release build
717723echo vcbuild.bat debug : builds debug build
0 commit comments