summaryrefslogtreecommitdiff
path: root/vcbuild.bat
diff options
context:
space:
mode:
authorSam Ruby <rubys@intertwingly.net>2018-06-23 15:42:12 -0400
committerRich Trott <rtrott@gmail.com>2018-07-20 13:37:40 -0700
commit946686521dab15d7725af9d28f4bfd5596ba27d6 (patch)
treecc42eda0db8f46bbe014f426084bb72211dcccc8 /vcbuild.bat
parent1ffd35310a5fa5ba0a5b0df963c70287ce004cc5 (diff)
downloadandroid-node-v8-946686521dab15d7725af9d28f4bfd5596ba27d6.tar.gz
android-node-v8-946686521dab15d7725af9d28f4bfd5596ba27d6.tar.bz2
android-node-v8-946686521dab15d7725af9d28f4bfd5596ba27d6.zip
tools: create HTML docs with unified/remark/rehype
PR-URL: https://github.com/nodejs/node/pull/21490 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'vcbuild.bat')
-rw-r--r--vcbuild.bat31
1 files changed, 20 insertions, 11 deletions
diff --git a/vcbuild.bat b/vcbuild.bat
index fa14e321e6..7c88c25ed1 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -255,7 +255,7 @@ goto exit
:wix-not-found
echo Build skipped. To generate installer, you need to install Wix.
-goto build-doc
+goto install-doctools
:msbuild-found
@@ -385,7 +385,7 @@ exit /b 1
:msi
@rem Skip msi generation if not requested
-if not defined msi goto build-doc
+if not defined msi goto install-doctools
:msibuild
echo Building node-v%FULLVERSION%-%target_arch%.msi
@@ -400,7 +400,7 @@ if errorlevel 1 echo Failed to sign msi&goto exit
:upload
@rem Skip upload if not requested
-if not defined upload goto build-doc
+if not defined upload goto install-doctools
if not defined SSHCONFIG (
echo SSHCONFIG is not set for upload
@@ -428,6 +428,23 @@ ssh -F %SSHCONFIG% %STAGINGSERVER% "touch nodejs/%DISTTYPEDIR%/v%FULLVERSION%/no
if errorlevel 1 goto exit
+:install-doctools
+REM only install if building doc OR testing doctool
+if not defined doc (
+ echo.%test_args% | findstr doctool 1>nul
+ if errorlevel 1 goto :skip-install-doctools
+)
+if exist "tools\doc\node_modules\unified\package.json" goto skip-install-doctools
+SETLOCAL
+cd tools\doc
+%npm_exe% install
+cd ..\..
+if errorlevel 1 goto exit
+ENDLOCAL
+:skip-install-doctools
+@rem Clear errorlevel from echo.%test_args% | findstr doctool 1>nul
+cd .
+
:build-doc
@rem Build documentation if requested
if not defined doc goto run
@@ -439,14 +456,6 @@ mkdir %config%\doc
robocopy /e doc\api %config%\doc\api
robocopy /e doc\api_assets %config%\doc\api\assets
-if exist "tools\doc\node_modules\js-yaml\package.json" goto doc-skip-js-yaml
-SETLOCAL
-cd tools\doc
-%npm_exe% install
-cd ..\..
-if errorlevel 1 goto exit
-ENDLOCAL
-:doc-skip-js-yaml
for %%F in (%config%\doc\api\*.md) do (
%node_exe% tools\doc\generate.js --format=json %%F > %%~dF%%~pF%%~nF.json
%node_exe% tools\doc\generate.js --node-version=v%FULLVERSION% --format=html --analytics=%DOCS_ANALYTICS% %%F > %%~dF%%~pF%%~nF.html