Skip to content

Simple demo of ncc and pkg tools to bundle NodeJS project into single file and standalone executable

License

Notifications You must be signed in to change notification settings

shikshan/ncc-pkg-demo

Repository files navigation

ncc and pkg tools demo

A simple demo of

  • compiling a NodeJS project into single file using ncc
  • creating a standalone executable using pkg

The target application is created using Nest TypeScript starter template.

Installation

Install ncc and pkg globally.

$ yarn global add @zeit/ncc
$ yarn global add pkg

Clone and set up this repository.

$ git clone https://github.com/shikshan/ncc-pkg-demo.git
$ cd ncc-pkg-demo
$ yarn install

Running the app

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
yarn start:prod

# bundle the application into a single file and a distributable.
# Check distro script in package.json for details.
yarn distro

# run the single file
yarn start:ncc

# run the standalone executable. It starts executable for mac, change as per your OS.
yarn start:pkg

About

Simple demo of ncc and pkg tools to bundle NodeJS project into single file and standalone executable

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published