Skip to content
Browse files

doc, src: sort + fill up cli options and env vars

* Alphabetize the command line options and environment
  variables in doc/api/ for consistency and readability.

* Update doc/api/ to include command line options
  being printed in the `node.PrintHelp()` function in src/
  but weren't otherwise documented in the cli spec. Options added


* ASCII sort the node man page command line options.
  This change brings sort order consistency between the
  cli options displayed in doc/node.1 and the cli options
  enumerated in other areas of the project.

  Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca`
  to correspond with the order of the options as displayed.

* Update `node.PrintHelp()` function to return command line options
  and environment variables sorted in ASCII order. Additionally,
  add missing options as sourced from doc/api/ Options
  added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS`
  environment variable.

  Also update the comments in the `node.PrintHelp()` method
  to C++ style.

* Create tests to validate that the newly ASCII sorted
  cli options in the `node.PrintHelp()` function are being
  returned according to build configurations as expected.

PR-URL: #19878
Refs: #19814
Reviewed-By: Vse Mozhet Byt <>
Reviewed-By: Khaidi Chu <>
Reviewed-By: James M Snell <>
  • Loading branch information
willhayslett authored and vsemozhetbyt committed Apr 13, 2018
1 parent 6376d43 commit a43e8896f2c252ef30b4da08402badbe3a17124f
Showing with 536 additions and 396 deletions.
  1. +259 −194 doc/api/
  2. +119 −120 doc/node.1
  3. +100 −82 src/
  4. +58 −0 test/parallel/test-cli-node-print-help.js

0 comments on commit a43e889

Please sign in to comment.