@@ -48,6 +48,7 @@ set lint_js=
48
48
set lint_cpp =
49
49
set lint_md =
50
50
set lint_md_build =
51
+ set format_md =
51
52
set i18n_arg =
52
53
set download_arg =
53
54
set build_release =
@@ -122,6 +123,7 @@ if /i "%1"=="lint-md" set lint_md=1&goto arg-ok
122
123
if /i " %1 " == " lint-md-build" set lint_md_build = 1& goto arg-ok
123
124
if /i " %1 " == " lint" set lint_cpp = 1& set lint_js=1& set lint_md=1& goto arg-ok
124
125
if /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
125
127
if /i " %1 " == " package" set package = 1& goto arg-ok
126
128
if /i " %1 " == " msi" set msi = 1& set licensertf=1& set download_arg=" --download=all" & set i18n_arg=full-icu& goto arg-ok
127
129
if /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
180
182
:: skip building if the only argument received was lint
181
183
if " %* " == " lint" if exist " %node_exe% " goto lint-cpp
182
184
185
+ :: skip building if the only argument received was format-md
186
+ if " %* " == " format-md" if exist " %node_exe% " goto format-md
187
+
183
188
if " %config% " == " Debug" set configure_flags = %configure_flags% --debug
184
189
if defined nosnapshot set configure_flags = %configure_flags% --without-snapshot
185
190
if 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
653
658
where wsl > NUL 2 >& 1
654
659
if " %ERRORLEVEL% " == " 0" set " NODEJS_MAKE = wsl make" & goto run-make-lint
655
660
echo Could not find GNU Make, needed for linting C/C++
661
+ echo Alternatively, you can use WSL
656
662
goto lint-js
657
663
658
664
:run-make-lint
@@ -677,7 +683,7 @@ echo "Deprecated no-op target 'lint_md_build'"
677
683
goto lint-md
678
684
679
685
:lint-md
680
- if not defined lint_md goto exit
686
+ if not defined lint_md goto format-md
681
687
echo Running Markdown linter on docs...
682
688
SETLOCAL ENABLEDELAYEDEXPANSION
683
689
set lint_md_files =
@@ -688,10 +694,10 @@ for /D %%D IN (doc\*) do (
688
694
)
689
695
%node_exe% tools\lint-md\lint-md.mjs %lint_md_files%
690
696
ENDLOCAL
691
- goto exit
697
+ goto format-md
692
698
693
699
:format-md
694
- if not defined lint_md goto exit
700
+ if not defined format_md goto exit
695
701
echo Running Markdown formatter on docs...
696
702
SETLOCAL ENABLEDELAYEDEXPANSION
697
703
set lint_md_files =
@@ -711,7 +717,7 @@ set exit_code=1
711
717
goto exit
712
718
713
719
: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]
715
721
echo Examples:
716
722
echo vcbuild.bat : builds release build
717
723
echo vcbuild.bat debug : builds debug build
0 commit comments