2016-08-31 19:25:38 +03:00
|
|
|
|
import chalk from 'chalk';
|
|
|
|
|
|
|
|
|
|
|
|
export default function help () {
|
|
|
|
|
|
console.log(`
|
|
|
|
|
|
${chalk.bold('pkg')} [options] <input>
|
|
|
|
|
|
|
|
|
|
|
|
${chalk.dim('Options:')}
|
|
|
|
|
|
|
|
|
|
|
|
-h, --help output usage information
|
2017-05-03 20:17:26 +02:00
|
|
|
|
-v, --version output pkg version
|
2016-08-31 19:25:38 +03:00
|
|
|
|
-t, --targets comma-separated list of targets (see examples)
|
2017-07-19 19:24:49 +03:00
|
|
|
|
-c, --config package.json or any json file with top-level config
|
2016-10-06 11:03:44 +03:00
|
|
|
|
--options bake v8 options into executable to run with them on
|
2016-08-31 19:25:38 +03:00
|
|
|
|
-o, --output output file name or template for several files
|
2017-06-12 21:07:55 +03:00
|
|
|
|
--out-path path to save output one or more executables
|
2016-09-29 13:12:23 +03:00
|
|
|
|
-d, --debug show more information during packaging process [off]
|
2016-09-01 13:26:06 +03:00
|
|
|
|
-b, --build don't download prebuilt base binaries, build them
|
2017-07-15 18:59:12 +03:00
|
|
|
|
--public speed up and disclose the sources of top-level project
|
2016-08-31 19:25:38 +03:00
|
|
|
|
|
|
|
|
|
|
${chalk.dim('Examples:')}
|
|
|
|
|
|
|
2016-09-07 11:06:28 +02:00
|
|
|
|
${chalk.gray('–')} Makes executables for Linux, macOS and Windows
|
2016-09-06 21:51:18 +03:00
|
|
|
|
${chalk.cyan('$ pkg index.js')}
|
|
|
|
|
|
${chalk.gray('–')} Takes package.json from cwd and follows 'bin' entry
|
|
|
|
|
|
${chalk.cyan('$ pkg .')}
|
2016-08-31 19:25:38 +03:00
|
|
|
|
${chalk.gray('–')} Makes executable for particular target machine
|
2017-01-21 19:05:05 +03:00
|
|
|
|
${chalk.cyan('$ pkg -t node6-alpine-x64 index.js')}
|
2016-09-29 13:12:23 +03:00
|
|
|
|
${chalk.gray('–')} Makes executables for target machines of your choice
|
2016-09-06 21:51:18 +03:00
|
|
|
|
${chalk.cyan('$ pkg -t node4-linux,node6-linux,node6-win index.js')}
|
2016-09-29 13:12:23 +03:00
|
|
|
|
${chalk.gray('–')} Bakes '--expose-gc' into executable
|
2016-10-06 11:03:44 +03:00
|
|
|
|
${chalk.cyan('$ pkg --options expose-gc index.js')}
|
2016-08-31 19:25:38 +03:00
|
|
|
|
|
|
|
|
|
|
`);
|
|
|
|
|
|
}
|