Skip to content
Permalink
Browse files

tools: create HTML docs with unified/remark/rehype

PR-URL: #21490
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information...
rubys authored and Trott committed Jun 23, 2018
1 parent 1ffd353 commit 946686521dab15d7725af9d28f4bfd5596ba27d6
Showing with 21,501 additions and 658 deletions.
  1. +51 −0 LICENSE
  2. +7 −2 Makefile
  3. +7 −7 test/doctool/test-doctool-html.js
  4. +188 −145 tools/doc/html.js
  5. +1 −0 tools/doc/node_modules/.bin/esparse
  6. +1 −0 tools/doc/node_modules/.bin/esvalidate
  7. +1 −0 tools/doc/node_modules/.bin/js-yaml
  8. +21 −0 tools/doc/node_modules/argparse/LICENSE
  9. +255 −0 tools/doc/node_modules/argparse/README.md
  10. +3 −0 tools/doc/node_modules/argparse/index.js
  11. +146 −0 tools/doc/node_modules/argparse/lib/action.js
  12. +53 −0 tools/doc/node_modules/argparse/lib/action/append.js
  13. +47 −0 tools/doc/node_modules/argparse/lib/action/append/constant.js
  14. +40 −0 tools/doc/node_modules/argparse/lib/action/count.js
  15. +47 −0 tools/doc/node_modules/argparse/lib/action/help.js
  16. +50 −0 tools/doc/node_modules/argparse/lib/action/store.js
  17. +43 −0 tools/doc/node_modules/argparse/lib/action/store/constant.js
  18. +27 −0 tools/doc/node_modules/argparse/lib/action/store/false.js
  19. +26 −0 tools/doc/node_modules/argparse/lib/action/store/true.js
  20. +149 −0 tools/doc/node_modules/argparse/lib/action/subparsers.js
  21. +47 −0 tools/doc/node_modules/argparse/lib/action/version.js
  22. +482 −0 tools/doc/node_modules/argparse/lib/action_container.js
  23. +14 −0 tools/doc/node_modules/argparse/lib/argparse.js
  24. +50 −0 tools/doc/node_modules/argparse/lib/argument/error.js
  25. +53 −0 tools/doc/node_modules/argparse/lib/argument/exclusive.js
  26. +74 −0 tools/doc/node_modules/argparse/lib/argument/group.js
  27. +1,161 −0 tools/doc/node_modules/argparse/lib/argument_parser.js
  28. +21 −0 tools/doc/node_modules/argparse/lib/const.js
  29. +87 −0 tools/doc/node_modules/argparse/lib/help/added_formatters.js
  30. +795 −0 tools/doc/node_modules/argparse/lib/help/formatter.js
  31. +76 −0 tools/doc/node_modules/argparse/lib/namespace.js
  32. +57 −0 tools/doc/node_modules/argparse/lib/utils.js
  33. +74 −0 tools/doc/node_modules/argparse/package.json
  34. +21 −0 tools/doc/node_modules/esprima/LICENSE.BSD
  35. +46 −0 tools/doc/node_modules/esprima/README.md
  36. +139 −0 tools/doc/node_modules/esprima/bin/esparse.js
  37. +236 −0 tools/doc/node_modules/esprima/bin/esvalidate.js
  38. +6,700 −0 tools/doc/node_modules/esprima/dist/esprima.js
  39. +141 −0 tools/doc/node_modules/esprima/package.json
  40. +21 −0 tools/doc/node_modules/js-yaml/LICENSE
  41. +313 −0 tools/doc/node_modules/js-yaml/README.md
  42. +132 −0 tools/doc/node_modules/js-yaml/bin/js-yaml.js
  43. +3,905 −0 tools/doc/node_modules/js-yaml/dist/js-yaml.js
  44. +1 −0 tools/doc/node_modules/js-yaml/dist/js-yaml.min.js
  45. +7 −0 tools/doc/node_modules/js-yaml/index.js
  46. +39 −0 tools/doc/node_modules/js-yaml/lib/js-yaml.js
  47. +59 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/common.js
  48. +819 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/dumper.js
  49. +43 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/exception.js
  50. +1,598 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/loader.js
  51. +76 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/mark.js
  52. +108 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/schema.js
  53. +18 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/schema/core.js
  54. +25 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/schema/default_full.js
  55. +28 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js
  56. +17 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js
  57. +25 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/schema/json.js
  58. +61 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type.js
  59. +138 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/binary.js
  60. +35 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/bool.js
  61. +116 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/float.js
  62. +173 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/int.js
  63. +86 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/js/function.js
  64. +60 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js
  65. +28 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js
  66. +8 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/map.js
  67. +12 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/merge.js
  68. +34 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/null.js
  69. +44 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/omap.js
  70. +53 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/pairs.js
  71. +8 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/seq.js
  72. +29 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/set.js
  73. +8 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/str.js
  74. +88 −0 tools/doc/node_modules/js-yaml/lib/js-yaml/type/timestamp.js
  75. +96 −0 tools/doc/node_modules/js-yaml/package.json
  76. +0 −2 tools/doc/node_modules/marked/.npmignore
  77. +0 −5 tools/doc/node_modules/marked/.travis.yml
  78. +0 −22 tools/doc/node_modules/marked/Gulpfile.js
  79. +0 −24 tools/doc/node_modules/marked/bower.json
  80. +0 −10 tools/doc/node_modules/marked/component.json
  81. +0 −426 tools/doc/node_modules/marked/doc/broken.md
  82. +0 −2 tools/doc/node_modules/marked/doc/todo.md
  83. +24 −0 tools/doc/node_modules/sprintf-js/LICENSE
  84. +88 −0 tools/doc/node_modules/sprintf-js/README.md
  85. +4 −0 tools/doc/node_modules/sprintf-js/dist/angular-sprintf.min.js
  86. +1 −0 tools/doc/node_modules/sprintf-js/dist/angular-sprintf.min.js.map
  87. +1 −0 tools/doc/node_modules/sprintf-js/dist/angular-sprintf.min.map
  88. +4 −0 tools/doc/node_modules/sprintf-js/dist/sprintf.min.js
  89. +1 −0 tools/doc/node_modules/sprintf-js/dist/sprintf.min.js.map
  90. +1 −0 tools/doc/node_modules/sprintf-js/dist/sprintf.min.map
  91. +58 −0 tools/doc/node_modules/sprintf-js/package.json
  92. +18 −0 tools/doc/node_modules/sprintf-js/src/angular-sprintf.js
  93. +208 −0 tools/doc/node_modules/sprintf-js/src/sprintf.js
  94. +1,314 −0 tools/doc/package-lock.json
  95. +8 −1 tools/doc/package.json
  96. +3 −1 tools/license-builder.sh
  97. +20 −11 vcbuild.bat
51 LICENSE
@@ -1197,6 +1197,57 @@ The externally maintained libraries used by Node.js are:
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

- unified, located at deps/unified, is licensed as follows:
"""
(The MIT License)

Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""

- remark-rehype, located at deps/remark-rehype, is licensed as follows:
"""
(The MIT License)

Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

- remark-cli, located at tools/remark-cli, is licensed as follows:
"""
(The MIT License)
@@ -266,7 +266,6 @@ test: all ## Runs default tests, linters, and builds docs.
# can be displayed together
$(MAKE) -s build-addons
$(MAKE) -s build-addons-napi
$(MAKE) -s test-doc
$(MAKE) -s cctest
$(MAKE) -s jstest

@@ -611,7 +610,8 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))

.PHONY: doc-only
doc-only: $(apidoc_dirs) $(apiassets) ## Builds the docs with the local or the global Node.js binary.
doc-only: tools/doc/node_modules \
$(apidoc_dirs) $(apiassets) ## Builds the docs with the local or the global Node.js binary.
# If it's a source tarball, assets are already in doc/api/assets,
# no need to install anything, we have already copied the docs over
if [ ! -d doc/api/assets ]; then \
@@ -1082,8 +1082,13 @@ tools/remark-preset-lint-node/node_modules: \

.PHONY: lint-md-build
lint-md-build: tools/remark-cli/node_modules \
tools/doc/node_modules \
tools/remark-preset-lint-node/node_modules

.PHONY: tools/doc/node_modules
tools/doc/node_modules:
@cd tools/doc && $(call available-node,$(run-npm-install))

.PHONY: lint-md
ifneq ("","$(wildcard tools/remark-cli/node_modules/)")

@@ -21,8 +21,8 @@ const toHTML = require('../../tools/doc/html.js');
const testData = [
{
file: fixtures.path('sample_document.md'),
html: '<ol><li>fish</li><li><p>fish</p></li><li><p>Redfish</p></li>' +
'<li>Bluefish</li></ol>'
html: '<ol><li>fish</li><li>fish</li></ol>' +
'<ul><li>Redfish</li><li>Bluefish</li></ul>'
},
{
file: fixtures.path('order_of_end_tags_5873.md'),
@@ -31,7 +31,7 @@ const testData = [
'id="foo_class_method_buffer_from_array">#</a> </span> </h3>' +
'<ul><li><code>array</code><a ' +
'href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/' +
'Reference/Global_Objects/Array" class="type">&lt;Array&gt;</a></li></ul>'
'Reference/Global_Objects/Array" class="type">&#x3C;Array></a></li></ul>'
},
{
file: fixtures.path('doc_with_yaml.md'),
@@ -45,11 +45,11 @@ const testData = [
'<h2>Foobar II<span><a class="mark" href="#foo_foobar_ii" ' +
'id="foo_foobar_ii">#</a></span></h2><div class="api_metadata">' +
'<details class="changelog"><summary>History</summary>' +
'<table><tr><th>Version</th><th>Changes</th></tr>' +
'<table><tbody><tr><th>Version</th><th>Changes</th></tr>' +
'<tr><td>v5.3.0, v4.2.0</td>' +
'<td><p><span>Added in: v5.3.0, v4.2.0</span></p></td></tr>' +
'<tr><td>v4.2.0</td><td><p>The <code>error</code> parameter can now be' +
'an arrow function.</p></td></tr></table></details></div> ' +
'an arrow function.</p></td></tr></tbody></table></details></div> ' +
'<p>Describe <code>Foobar II</code> in more detail here.' +
'<a href="http://man7.org/linux/man-pages/man1/fg.1.html"><code>fg(1)' +
'</code></a></p><h2>Deprecated thingy<span><a class="mark" ' +
@@ -65,8 +65,8 @@ const testData = [
},
{
file: fixtures.path('sample_document.md'),
html: '<ol><li>fish</li><li><p>fish</p></li><li><p>Redfish</p></li>' +
'<li>Bluefish</li></ol>',
html: '<ol><li>fish</li><li>fish</li></ol>' +
'<ul><li>Red fish</li><li>Blue fish</li></ul>',
analyticsId: 'UA-67020396-1'
},
];
Oops, something went wrong.

0 comments on commit 9466865

Please sign in to comment.
You can’t perform that action at this time.