diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 61 |
1 files changed, 38 insertions, 23 deletions
| @@ -88,29 +88,44 @@ f! | |||
| 88 | 88 | ||
| 89 | ```sh | 89 | ```sh |
| 90 | > yue -h | 90 | > yue -h |
| 91 | Usage: yue [options|files|directories] ... | 91 | Usage: yue |
| 92 | 92 | [options] [<file/directory>] ... | |
| 93 | -h Print this message | 93 | yue -e <code_or_file> [args...] |
| 94 | -e str Execute a file or raw codes | 94 | yue -w [<directory>] [options] |
| 95 | -m Generate minified codes | 95 | yue - |
| 96 | -r Rewrite output to match original line numbers | 96 | |
| 97 | -t path Specify where to place compiled files | 97 | Notes: |
| 98 | -o file Write output to file | 98 | - '-' / '--' must be the first and only argument. |
| 99 | -s Use spaces in generated codes instead of tabs | 99 | - '-o/--output' can not be used with multiple input files. |
| 100 | -p Write output to standard out | 100 | - '-w/--watch' can not be used with file input (directory only). |
| 101 | -b Dump compile time (does not write output) | 101 | - with '-e/--execute', remaining tokens are treated as script args. |
| 102 | -g Dump global variables used in NAME LINE COLUMN | 102 | |
| 103 | -l Write line numbers from source codes | 103 | Options: |
| 104 | -j Disable implicit return at end of file | 104 | -h, --help Show this help message and exit. |
| 105 | -c Reserve comments before statement from source codes | 105 | -e <str>, --execute <str> Execute a file or raw codes |
| 106 | -w path Watch changes and compile every file under directory | 106 | -m, --minify Generate minified codes |
| 107 | -v Print version | 107 | -r, --rewrite Rewrite output to match original line numbers |
| 108 | -- Read from standard in, print to standard out | 108 | -t <output_to>, --output-to <output_to> |
| 109 | (Must be first and only argument) | 109 | Specify where to place compiled files |
| 110 | 110 | -o <file>, --output <file> Write output to file | |
| 111 | --target=version Specify the Lua version that codes will be generated to | 111 | -p, --print Write output to standard out |
| 112 | (version can only be 5.1, 5.2, 5.3 or 5.4) | 112 | -b, --benchmark Dump compile time (doesn't write output) |
| 113 | --path=path_str Append an extra Lua search path string to package.path | 113 | -g, --globals Dump global variables used in NAME LINE COLUMN |
| 114 | -s, --spaces Use spaces in generated codes instead of tabs | ||
| 115 | -l, --line-numbers Write line numbers from source codes | ||
| 116 | -j, --no-implicit-return Disable implicit return at end of file | ||
| 117 | -c, --reserve-comments Reserve comments before statement from source codes | ||
| 118 | -w [<dir>], --watch [<dir>] | ||
| 119 | Watch changes and compile every file under directory | ||
| 120 | -v, --version Print version | ||
| 121 | - Read from standard in, print to standard out | ||
| 122 | (Must be first and only argument) | ||
| 123 | -- Same as '-' (kept for backward compatibility) | ||
| 124 | |||
| 125 | --target <version> Specify the Lua version that codes will be generated to | ||
| 126 | (version can only be 5.1 to 5.5) | ||
| 127 | --path <path_str> Append an extra Lua search path string to package.path | ||
| 128 | --<key>=<value> Pass compiler option in key=value form (existing behavior) | ||
| 114 | 129 | ||
| 115 | Execute without options to enter REPL, type symbol '$' | 130 | Execute without options to enter REPL, type symbol '$' |
| 116 | in a single line to start/stop multi-line mode | 131 | in a single line to start/stop multi-line mode |
