LinuxCommandLibrary

ncc

Compile a Node.js application into a single file.

TLDR

Bundle a Node.js application

$ ncc build [path/to/file.js]
copy


Bundle and minify a Node.js application
$ ncc build --minify [path/to/file.js]
copy


Bundle and minify a Node.js application and generate source maps
$ ncc build --source-map [path/to/file.js]
copy


Automatically recompile on changes to source files
$ ncc build --watch [path/to/file.js]
copy


Bundle a Node.js application into a temporary directory and run it for testing
$ ncc run [path/to/file.js]
copy


Clean the ncc cache
$ ncc clean cache
copy

Copied to clipboard