(options)
| 46 | } |
| 47 | |
| 48 | function getHelpText(options) { |
| 49 | const opts = Object.keys(options) |
| 50 | .map(k => options[k]) |
| 51 | .sort((a,b) => a.display_index - b.display_index); |
| 52 | |
| 53 | const text = ` |
| 54 | Usage: jscodeshift [OPTION]... PATH... |
| 55 | or: jscodeshift [OPTION]... -t TRANSFORM_PATH PATH... |
| 56 | or: jscodeshift [OPTION]... -t URL PATH... |
| 57 | or: jscodeshift [OPTION]... --stdin < file_list.txt |
| 58 | |
| 59 | Apply transform logic in TRANSFORM_PATH (recursively) to every PATH. |
| 60 | If --stdin is set, each line of the standard input is used as a path. |
| 61 | |
| 62 | Options: |
| 63 | "..." behind an option means that it can be supplied multiple times. |
| 64 | All options are also passed to the transformer, which means you can supply custom options that are not listed here. |
| 65 | |
| 66 | ${opts.map(formatOption).join('\n')} |
| 67 | `; |
| 68 | return text.trimLeft(); |
| 69 | } |
| 70 | |
| 71 | function validateOptions(parsedOptions, options) { |
| 72 | const errors = []; |
no test coverage detected
searching dependent graphs…