@@ -43,8 +43,30 @@ pkg [options] <input>
4343 --public speed up and disclose the sources of top-level project
4444 --public-packages force specified packages to be considered public
4545 --no-bytecode skip bytecode generation and include source files as plain js
46+ --no-native-build skip native addons build
4647 --no-dict comma-separated list of packages names to ignore dictionaries. Use --no-dict * to disable all dictionaries
4748 -C, --compress [default=None] compression algorithm = Brotli or GZip
49+
50+ Examples:
51+
52+ – Makes executables for Linux, macOS and Windows
53+ $ pkg index.js
54+ – Takes package.json from cwd and follows ' bin' entry
55+ $ pkg .
56+ – Makes executable for particular target machine
57+ $ pkg -t node14-win-arm64 index.js
58+ – Makes executables for target machines of your choice
59+ $ pkg -t node12-linux,node14-linux,node14-win index.js
60+ – Bakes ' --expose-gc' and ' --max-heap-size=34' into executable
61+ $ pkg --options "expose-gc,max-heap-size=34" index.js
62+ – Consider packageA and packageB to be public
63+ $ pkg --public-packages "packageA,packageB" index.js
64+ – Consider all packages to be public
65+ $ pkg --public-packages "*" index.js
66+ – Bakes ' --expose-gc' into executable
67+ $ pkg --options expose-gc index.js
68+ – reduce size of the data packed inside the executable with GZip
69+ $ pkg --compress GZip index.js
4870```
4971
5072The entrypoint of your project is a mandatory CLI argument. It may be:
0 commit comments