From 6f684d95784ec30baa9d3daa98919f1e1bd47631 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 26 Oct 2017 14:28:56 +0200 Subject: [PATCH] build: make doc target quiet Currently it can be a little difficult to detect errors in the output from the doc target. This commit suggests reducing the output to make it easier to identify errors. PR-URL: https://github.com/nodejs/node/pull/16516 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil Reviewed-By: Gibson Fahnestock Reviewed-By: Joyee Cheung --- Makefile | 10 +++++----- tools/doc/generate.js | 1 - tools/doc/preprocess.js | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 1d7d3799f02cc4..79efac77743699 100644 --- a/Makefile +++ b/Makefile @@ -542,13 +542,13 @@ doc-only: $(apidocs_html) $(apidocs_json) doc: $(NODE_EXE) doc-only $(apidoc_dirs): - mkdir -p $@ + @mkdir -p $@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets - cp $< $@ + @cp $< $@ out/doc/%: doc/% - cp -r $< $@ + @cp -r $< $@ # check if ./node is actually set, else use user pre-installed binary gen-json = tools/doc/generate.js --format=json $< > $@ @@ -566,11 +566,11 @@ gen-doc = \ [ -x $(NODE) ] && $(NODE) $(1) || node $(1) out/doc/api/%.json: doc/api/%.md - $(call gen-doc, $(gen-json)) + @$(call gen-doc, $(gen-json)) # check if ./node is actually set, else use user pre-installed binary out/doc/api/%.html: doc/api/%.md - $(call gen-doc, $(gen-html)) + @$(call gen-doc, $(gen-html)) docopen: $(apidocs_html) @$(PYTHON) -mwebbrowser file://$(PWD)/out/doc/api/all.html diff --git a/tools/doc/generate.js b/tools/doc/generate.js index 53c9c5b5eec7bd..906aa962196306 100644 --- a/tools/doc/generate.js +++ b/tools/doc/generate.js @@ -54,7 +54,6 @@ if (!inputFile) { throw new Error('No input file specified'); } -console.error('Input file = %s', inputFile); fs.readFile(inputFile, 'utf8', function(er, input) { if (er) throw er; // process the input for @include lines diff --git a/tools/doc/preprocess.js b/tools/doc/preprocess.js index 01340d40602ba7..00654baa6cfb5e 100644 --- a/tools/doc/preprocess.js +++ b/tools/doc/preprocess.js @@ -25,7 +25,6 @@ function processIncludes(inputFile, input, cb) { const includes = input.match(includeExpr); if (includes === null) return cb(null, input); var errState = null; - console.error(includes); var incCount = includes.length; if (incCount === 0) cb(null, input); includes.forEach(function(include) {