Document --module option for d8

- I think d8's ability to load es6 modules is important enough to
document through the CLI
- I also tried to simplify the d8/shell CLI synopsis

This is my first patch; I can't run the automated test suite.

Change-Id: I6376542f57f11dd8ec53be9b53f3d17d46a86fed
Reviewed-on: https://chromium-review.googlesource.com/1056530
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53198}
This commit is contained in:
ray glover 2018-05-14 00:19:39 +01:00 committed by Commit Bot
parent be5cfb2295
commit d22b125a0c
2 changed files with 7 additions and 12 deletions

View File

@ -128,6 +128,7 @@ Paul Lind <plind44@gmail.com>
Qingyan Li <qingyan.liqy@alibaba-inc.com>
Qiuyi Zhang <qiuyi.zqy@alibaba-inc.com>
Rafal Krypa <rafal@krypa.net>
Ray Glover <ray@rayglover.net>
Refael Ackermann <refack@gmail.com>
Rene Rebe <rene@exactcode.de>
Rick Waldron <waldron.rick@gmail.com>

View File

@ -605,18 +605,12 @@ void FlagList::PrintHelp() {
CpuFeatures::PrintFeatures();
OFStream os(stdout);
os << "Usage:\n"
" shell [options] -e string\n"
" execute string in V8\n"
" shell [options] file1 file2 ... filek\n"
" run JavaScript scripts in file1, file2, ..., filek\n"
" shell [options]\n"
" shell [options] --shell [file1 file2 ... filek]\n"
" run an interactive JavaScript shell\n"
" d8 [options] file1 file2 ... filek\n"
" d8 [options]\n"
" d8 [options] --shell [file1 file2 ... filek]\n"
" run the new debugging shell\n\n"
os << "Synopsis:\n"
" shell [options] [--shell] [<file>...]\n"
" d8 [options] [-e <string>] [--shell] [[--module] <file>...]\n\n"
" -e execute a string in V8\n"
" --shell run an interactive JavaScript shell\n"
" --module execute a file as a JavaScript module\n\n"
"Options:\n";
for (const Flag& f : flags) {