summaryrefslogtreecommitdiff
path: root/tools/doc/generate.js
diff options
context:
space:
mode:
authorTristian Flanagan <tflanagan@datacollaborative.com>2015-11-13 21:40:38 -0500
committerAnna Henningsen <anna@addaleax.net>2016-05-05 01:15:10 +0200
commit015f4fda0eecf8b5014973cd558674dcb5a120cf (patch)
tree377ef715adea2d1a28a95cfb0fcdcd3ba65f545c /tools/doc/generate.js
parent020968dd1803220b76b8fdcbf2bab54c66b695f4 (diff)
downloadandroid-node-v8-015f4fda0eecf8b5014973cd558674dcb5a120cf.tar.gz
android-node-v8-015f4fda0eecf8b5014973cd558674dcb5a120cf.tar.bz2
android-node-v8-015f4fda0eecf8b5014973cd558674dcb5a120cf.zip
tools: parse documentation metadata
This commit introduces the Documentation YAML metadata concept to the documentation. - Parses added or Added for HTML - Parses all data for JSON Ref: https://github.com/nodejs/node/pull/3867 Ref: https://github.com/nodejs/node/issues/3713 Ref: https://github.com/nodejs/node/issues/6470 PR-URL: https://github.com/nodejs/node/pull/6495 Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'tools/doc/generate.js')
-rw-r--r--tools/doc/generate.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/doc/generate.js b/tools/doc/generate.js
index ff14cbd5e8..9048b484ce 100644
--- a/tools/doc/generate.js
+++ b/tools/doc/generate.js
@@ -1,15 +1,15 @@
'use strict';
-var processIncludes = require('./preprocess.js');
-var fs = require('fs');
+const processIncludes = require('./preprocess.js');
+const fs = require('fs');
// parse the args.
// Don't use nopt or whatever for this. It's simple enough.
-var args = process.argv.slice(2);
-var format = 'json';
-var template = null;
-var inputFile = null;
+const args = process.argv.slice(2);
+let format = 'json';
+let template = null;
+let inputFile = null;
args.forEach(function(arg) {
if (!arg.match(/^\-\-/)) {