()
| 65 | }) |
| 66 | |
| 67 | export function printUsage() { |
| 68 | // language=txt |
| 69 | console.log(` |
| 70 | ${chalk.bold('zx ' + VERSION)} |
| 71 | A tool for writing better scripts |
| 72 | |
| 73 | ${chalk.bold('Usage')} |
| 74 | zx [options] <script> |
| 75 | |
| 76 | ${chalk.bold('Options')} |
| 77 | --quiet suppress any outputs |
| 78 | --verbose enable verbose mode |
| 79 | --shell=<path> custom shell binary |
| 80 | --prefix=<command> prefix all commands |
| 81 | --postfix=<command> postfix all commands |
| 82 | --prefer-local, -l prefer locally installed packages and binaries |
| 83 | --cwd=<path> set current directory |
| 84 | --eval=<js>, -e evaluate script |
| 85 | --ext=<.mjs> script extension |
| 86 | --install, -i install dependencies |
| 87 | --registry=<URL> npm registry, defaults to https://registry.npmjs.org/ |
| 88 | --version, -v print current zx version |
| 89 | --help, -h print help |
| 90 | --repl start repl |
| 91 | --env=<path> path to env file |
| 92 | --experimental enables experimental features (deprecated) |
| 93 | |
| 94 | ${chalk.italic('Full documentation:')} ${chalk.underline(Fail.DOCS_URL)} |
| 95 | `) |
| 96 | } |
| 97 | |
| 98 | export async function main(): Promise<void> { |
| 99 | if (argv.version) { |
no outgoing calls
no test coverage detected
searching dependent graphs…