0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-22 07:37:56 +01:00
Commit Graph

71 Commits

Author SHA1 Message Date
Antoine du Hamel
8103a6418e
doc: rename possibly confusing variable and CSS class
A "selector" usually refers to a CSS selector, when here it refers to a
checkbox.

PR-URL: https://github.com/nodejs/node/pull/49536
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-09-08 17:03:57 +02:00
Livia Medeiros
052434a0c1
test: use tmpdir.resolve()
PR-URL: https://github.com/nodejs/node/pull/49136
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-21 16:41:53 +00:00
Joyee Cheung
cd36f6eeff
test: run doctool tests in parallel
PR-URL: https://github.com/nodejs/node/pull/47273
Refs: https://github.com/nodejs/node/issues/47146
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-04-04 21:02:47 +02:00
Fabien Michel
bfb5ba7776
tools: fix incorrect version history order
This fixes an error in parseYAML(text), the version sorting
coudn't be right as we compared an arrify string
(ie. a = ["v18.11, v16.7.0"]) with an array of strings
(ie. b = ["v18.07", "v16.7.0"]) in versionSort(a, b).

minVersion(a) couldn't find the minimum version with an arrify string
like a = ["v18.11, v16.7.0"].
That's why incorrect version history orders sometimes appeared.

Furthermore, no need to sort the added version as it always comes first.
So, it can be the last one to be pushed in the meta.changes array.

Fixes: https://github.com/nodejs/node/issues/45670

Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45728
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-14 09:38:36 +00:00
Antoine du Hamel
bd462ad81b
test: add lint rule to enforce trailing commas
Only activated on some subfolders to minimize the diff, ideally this
rule would be applied gradually to the entire codebase in follow-up
commits.

PR-URL: https://github.com/nodejs/node/pull/45468
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2022-11-17 13:02:11 +00:00
Rafael Gonzaga
03553c5570
doc: move policy docs to the permissions scope
PR-URL: https://github.com/nodejs/node/pull/44222
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-09-05 16:07:45 +00:00
Luigi Pinca
8c4cf96967
doc: update default branch name in test/**
Refs: https://github.com/nodejs/node/issues/33864

PR-URL: https://github.com/nodejs/node/pull/43445
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-06-17 10:49:22 +02:00
Paolo Insogna
9be1dcff34
doc,tools: improve navigability of API docs
PR-URL: https://github.com/nodejs/node/pull/41404
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-24 12:00:42 +01:00
Antoine du Hamel
5d4da62514
tools: lint deprecation codes
Add a rule to make sure deprecation codes are in order.

PR-URL: https://github.com/nodejs/node/pull/41992
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-19 18:14:09 +01:00
Rich Trott
e2e2bc83c0
test: use Object.hasOwn() where applicable
Replace Object.prototpye.hasOwnProperty() with Object.hasOwn() where
applicable.

PR-URL: https://github.com/nodejs/node/pull/41664
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-25 07:03:17 +00:00
Michaël Zasso
2b080cb23f
tools: update doc generator dependencies
PR-URL: https://github.com/nodejs/node/pull/40042
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-18 16:32:44 +02:00
foxxyz
6fdd5827f0 doc: anchor link parity between markdown and html-generated docs
Main changes:

- Replace current HTML anchor generation to match
  header anchor generation in Github markdown.
- Remove unnecessary double namespacing on generated anchors/links (E.G.
  `esm.md#loaders` instead of `esm.md#esm_loaders`).
- Anchors/links are automatically prefixed with their respective modules
  when concatenated for usage in `all.html`.

Benefits:

- All anchor links within and between markdown API docs actually work.
- Adding new anchor links no longer requires contributors to generate
  the HTML docs first to look up the correct anchors.
- Anchors are much shorter.
- All previous anchor links are preserved by generating hidden legacy
  anchors.

PR-URL: https://github.com/nodejs/node/pull/39304
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-08-30 00:40:20 +02:00
Michaël Zasso
de01f475d5
tools: update doctool dependencies, migrate to ESM
- Migrated to ESM because some dependencies now require it.
- Did not update `highlight.js` to v11 because it has many breaking
  changes.
- Used non-deprecated `highlight.js` API.

Refs: https://github.com/highlightjs/highlight.js/issues/2277
Fixes: https://github.com/nodejs/node/issues/38938
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38966
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-06-14 08:22:00 -07:00
Rich Trott
330f25ef82 test: prepare for consistent comma-dangle lint rule
Make changes so that tests will pass when the comma-dangle settings
applied to the rest of the code base are also applied to tests.

PR-URL: https://github.com/nodejs/node/pull/37930
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
2021-04-01 23:14:29 -07:00
Rich Trott
3700ba0be3 doc,tools: use only one level 1 header per page
Increment the header levels from markdown files when producing HTML
documents. This is both better semantically (as the two h1 headers in
current docs are not actually equivalent level semantically--the second
belongs below/inside the first) and better for accessibility. (It is
valid HTML to have multiple h1 headers in a document, but it can be bad
for screen reader experience.)

PR-URL: https://github.com/nodejs/node/pull/37839
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-03-25 11:23:58 -07:00
Antoine du Hamel
0a77830342 test: fix deprecation warning in test-doctool-html
PR-URL: https://github.com/nodejs/node/pull/37858
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-03-23 06:09:49 -07:00
Antoine du Hamel
2e1e74e9f8 tools,doc: add support for several flavors of JS code snippets
Enable code example using both modern ESM syntax and legacy CJS syntax.
It adds a toggle on the web interface to let users switch from one
JavaScript flavor to the other.

PR-URL: https://github.com/nodejs/node/pull/37162
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-03-06 16:13:57 +01:00
Antoine du Hamel
1c6484b8c1 test: fix test-doctool-html
Refs: https://github.com/nodejs/node/pull/37301

PR-URL: https://github.com/nodejs/node/pull/37397
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-02-16 18:52:24 +01:00
Rich Trott
996b85b5c2 test,doc,lib: adjust object literal newlines for lint rule
Before enabling object-curly-newline for our ESLint rules, adjust files
to comply with it.

Refs: https://eslint.org/docs/rules/object-curly-newline

PR-URL: https://github.com/nodejs/node/pull/37040
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-01-26 16:49:18 -08:00
Tobias Nießen
30fb4a015d test: add common.mustSucceed
PR-URL: https://github.com/nodejs/node/pull/35086
Reviewed-By: Ruy Adorno <ruyadorno@github.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-17 00:48:26 +02:00
Antoine du Hamel
ecf5060a42 doc: use .md extension for internal links
This helps catch broken links as part of the test suite. This also
improves the user experience when browsing the markdown files.

PR-URL: https://github.com/nodejs/node/pull/35191
Fixes: https://github.com/nodejs/node/issues/35189
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-01 06:19:12 -07:00
Antoine du HAMEL
d2c5e89165 tools,doc: allow page titles to contain inline code
Previously the HTML title would be cut to the first text node only.

PR-URL: https://github.com/nodejs/node/pull/35003
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
2020-09-03 06:36:03 -07:00
Rich Trott
6f12643142 doc: use _Static method_ instead of _Class Method_
Our docs describe static methods as Class Methods which seems
idiosyncratic for JavaScript. Align with MDN which calls them static
methods.

Refs: https://developer.mozilla.org/en-US/docs/MDN/Contribute/Structures/API_references/What_does_an_API_reference_need

JSON format for our docs will still use the key name `classMethods` for
this. I would like to change it to `staticMethods` but I don't know if
that will break things for consumers. So, leaving it alone. It's a
machine-consumable label more than a human-readable so I can live with
that.

PR-URL: https://github.com/nodejs/node/pull/34659
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-08-09 07:02:28 -07:00
Alec Davidson
e68563e31c
doc: add dynamic source code links
Fixes: https://github.com/nodejs/node/pull/33977

PR-URL: https://github.com/nodejs/node/pull/33996
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-26 10:25:14 -07:00
Richard Lau
0ddfd0fc12
test: fix tool path in test-doctool-versions.js
Path to the versions tool tested by test-doctool-versions.js would
be incorrect if the test temporary directory was redirected (e.g.
via NODE_TEST_DIR) outside of `test/`.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32645
Refs: https://github.com/nodejs/node/pull/32518
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-05 21:18:31 +02:00
Richard Lau
25a1f04cdc
tools: only fetch previous versions when necessary
Refactor the logic for working out the previous versions of Node.js for
the API documentation so that the parsing (including the potential https
get) happens at most once per build (as opposed to the current once per
generated API doc).

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32518
Fixes: https://github.com/nodejs/node/issues/32512
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-03-31 18:25:10 -04:00
Rich Trott
be46a7257b tools: update JSON header parsing for backticks
Methods, events, and so on in headers in our documentation may (and
should) be set off with backticks in the raw markdown. When that
happens, the headers is misinterpreted by tools/json.js as not being a
method or event. Update the JSON tool generator to accommodate backticks
in this situation and add a test for this situation.

Fixes: https://github.com/nodejs/node/issues/31290

PR-URL: https://github.com/nodejs/node/pull/31294
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-01-12 07:10:33 -08:00
Marek Łabuz
62c61b754d
tools: add unified plugin changing links for html docs
This commit introduces additional stage in the process of generating
html docs from markdown files. Plugin transforms links to *.md files
in the respository to links to *.html files in the online documentation.

Fixes: https://github.com/nodejs/node/issues/28689

PR-URL: https://github.com/nodejs/node/pull/29946
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-30 18:17:56 +01:00
Richard Lau
3b124e0a73
tools: make doctool work if no internet available
Allow doctool to fallback to use local files if not building a release
build.

PR-URL: https://github.com/nodejs/node/pull/30214
Fixes: https://github.com/nodejs/node/issues/29918
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-11-05 22:10:33 -05:00
Rich Trott
f4f856b238 test: fix flaky doctool and test
Doctool tests have been failing a lot in CI on Win2008 R2. It appears
async functions and callback-based functions are being used in
combination such that the callback-based function cannot guarantee that
it will invoke its callback. Convert the callback-based functions to
async functions so we have one paradigm and reliable results.

PR-URL: https://github.com/nodejs/node/pull/29979
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-10-15 13:22:41 -07:00
Joyee Cheung
9190e4ecdf tools: make apilinks building more robust
1. Move the apilinks.json file into out/doc so it gets cleaned when
  running `make docclean`
2. When the apilinks.json generated is empty, throw a specific error
  so it's easier to understand what's wrong
3. Write to a file passed through CLI arguments instead writing to
  stdout in apilinks.js so the build process is more robust in
  the case of a bad binary

PR-URL: https://github.com/nodejs/node/pull/25019
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-18 05:14:24 +01:00
Rich Trott
6f64cda1ee tools,doc: fix version picker bug in html.js
The processing of strings like `8.x` into a major version number and a
minor version number results in minor versions that are `NaN`. In that
situation, since the picker will link to the latest docs in the
major version, include the version in the version picker.

Fixes: https://github.com/nodejs/node/issues/23979
PR-URL: https://github.com/nodejs/node/pull/24638
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-11-27 19:14:54 -08:00
cjihrig
a74b4a062f
test: remove unused catch bindings
PR-URL: https://github.com/nodejs/node/pull/24079
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2018-11-06 10:59:18 -05:00
Ben Noordhuis
df6a1306e8 doc: remove GA tracking
The Google Analytics tracking wasn't wholly uncontroversial and hasn't
been used in practice. Remove it.

PR-URL: https://github.com/nodejs/node/pull/23083
Fixes: https://github.com/nodejs/node/issues/22652
Refs: https://github.com/nodejs/node/pull/6601
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-04 07:18:23 +02:00
Sam Ruby
60465700ed tools: Include links to source code in documentation
Parse source code using acorn; extracting exports.  When producing
documentation, match exports to headers.  When a match is found, add a [src]
link.

This first commit handles simple exported classes and functions, and does so
without requiring any changes to the source code or markdown.  Subsequent
commits will attempt to match more headers, and some of these changes are
likely to require changes to the source code and/or markdown.

PR-URL: https://github.com/nodejs/node/pull/22405
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-08-29 22:20:46 -04:00
Sam Ruby
f41dd5592e tools: produce JSON documentation using unified/remark/rehype
PR-URL: https://github.com/nodejs/node/pull/21697
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-07-25 21:33:06 +03:00
Sam Ruby
c57e11c2f6 test: provide better message for orphan output documentation
PR-URL: https://github.com/nodejs/node/pull/21913
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-23 12:51:11 -07:00
Sam Ruby
946686521d 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>
2018-07-20 13:37:40 -07:00
Sam Ruby
0c743b5f77 tools: build all.json by combining generated JSON
Notes:

1) Removed a number of root properties that did not seem relevant:
   source, desc, and introduced_in.  There no longer is a source, and
   the other two are from the first include and do not reflect the
   entire API.

2) As with https://github.com/nodejs/node/issues/20100, the current
   "desc" properties sometimes contained in-page links, other times
   referenced another page, and often did not match the links in the
   original HTML or JSON file. I chose to standardize on external links
   as "desc" values are isolated snippets as opposed to all.html which
   can be viewed as a standalone and self contained document.

3) Eliminated preprocessing for @include entirely, including the test
   case for this function.

4) _toc.md was renamed to index.md.

5) index comments no longer appear in embedded TOCs (left hand side
   column in the generated documentation.

PR-URL: https://github.com/nodejs/node/pull/21637
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-09 22:57:33 +03:00
Vse Mozhet Byt
759809f674 test: skip non-doc files in test-make-doc checks
PR-URL: https://github.com/nodejs/node/pull/21531
Fixes: https://github.com/nodejs/node/issues/21519
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-27 23:13:40 +03:00
Vse Mozhet Byt
e6b7f0ef0c tools, doc: wrap manpage links in code elements
PR-URL: https://github.com/nodejs/node/pull/20785
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-05-17 23:31:50 +03:00
Vse Mozhet Byt
fb93984445 test: modernize and correct test-doctool-html.js
PR-URL: https://github.com/nodejs/node/pull/20676
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-14 19:21:04 +03:00
Vse Mozhet Byt
974df9c2be
tools: remove redundant code in doc/html.js
This PR reduces code by 40 lines and docs size by ~7.5 KB. Only
<div class="signature">...</div> wrappers are removed from docs,
no other changes are found in results.

PR-URL: https://github.com/nodejs/node/pull/20514
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-07 10:43:43 +02:00
Vse Mozhet Byt
ad6a65ba11 tools: simplify HTML generation
PR-URL: https://github.com/nodejs/node/pull/20307
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-28 00:52:25 +03:00
Vse Mozhet Byt
b5884fba9a test: amplify and optimize doctool/test-make-doc
PR-URL: https://github.com/nodejs/node/pull/19581
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-03-28 03:30:28 +03:00
Vse Mozhet Byt
0048169f5e test: fix path in doctool/test-doctool-json
PR-URL: https://github.com/nodejs/node/pull/19287
Refs: https://github.com/nodejs/node/pull/17820
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-03-11 23:01:24 +02:00
Rich Trott
3c31bfff65 benchmark,lib,test,tools: use consistent quotes
In preparation for a linting rule, use consistent quotation for
properties in objects.

PR-URL: https://github.com/nodejs/node/pull/19156
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-03-07 19:06:44 -08:00
Michaël Zasso
3dc3063275 tools: move eslint from tools to tools/node_modules
This is required because we need to add the babel-eslint dependency
and it has to be able to resolve "eslint".
babel-eslint is required to support future ES features such as async
iterators and import.meta.

Refs: https://github.com/nodejs/node/pull/17755
PR-URL: https://github.com/nodejs/node/pull/17820
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-11 09:48:05 +01:00
Rich Trott
fc8e8215f6 test: remove common.projectDir
common.projectDir is used in one test, so it's not so common. Remove
from common module to the one test file that needs it.

PR-URL: https://github.com/nodejs/node/pull/17781
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21 10:11:32 -08:00
Joyee Cheung
289fcb05be
build: do not build doc in source tarball
PR-URL: https://github.com/nodejs/node/pull/17100
Fixes: https://github.com/nodejs/node/issues/16650
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-11-20 21:38:50 +08:00