1.0.0 • Published 4 years ago

pkg-api v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

pkg-api Travis CI Build Status

API for pkg.

NPM Badge

Install

npm install pkg pkg-api

Usage

const pkg = require("pkg-api");

await pkg("index.js", {
	targets: "node10-win",
	output: "dist/output.exe"
);

API

pkg(input, options?)

input

Type: string

The entry file to build.

options

Type: object

build

Type: boolean\ Default: false

Whether to compile base binaries instead of downloading them.

debug

Type: boolean\ Default: false

Whether to log the packaging process.

config

Type: string\ Default: package.json

A package.json or any other json file containing the top-level config.

options

Type: string

A space-separated list of runtime options to pass to Node.js/V8.

output

Type: string

If only 1 executable is created, set its path.

outDir

The output directory to place the executables for multiple targets.

targets

A command-separated list of targets to build for.

Related

  • pkg - CLI used by this API.