SIGN IN SIGN UP
vercel / pkg UNCLAIMED

Package your Node.js project into an executable

0 0 0 JavaScript
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)
-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
--out-path path to save output one or more executables
-d, --debug show more information during packaging process [off]
-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
${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')}
${chalk.gray('')} Makes executables for target machines of your choice
${chalk.cyan('$ pkg -t node4-linux,node6-linux,node6-win index.js')}
${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
`);
}