From 35d4a1337f29318ca69809b77e7cb73e755174af Mon Sep 17 00:00:00 2001 From: Axel Navarro Date: Mon, 15 Mar 2021 15:32:48 -0300 Subject: [PATCH] ncc: add page (#5447) --- pages/common/ncc.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pages/common/ncc.md diff --git a/pages/common/ncc.md b/pages/common/ncc.md new file mode 100644 index 000000000..f349eeeae --- /dev/null +++ b/pages/common/ncc.md @@ -0,0 +1,29 @@ +# ncc + +> Compile a Node.js application into a single file. +> Supports TypeScript, binary addons and dynamic requires. +> More information: . + +- Bundle a Node.js application: + +`ncc build {{path/to/file.js}}` + +- Bundle and minify a Node.js application: + +`ncc build --minify {{path/to/file.js}}` + +- Bundle and minify a Node.js application and generate source maps: + +`ncc build --source-map {{path/to/file.js}}` + +- Automatically recompile on changes to source files: + +`ncc build --watch {{path/to/file.js}}` + +- Bundle a Node.js application into a temporary directory and run it for testing: + +`ncc run {{path/to/file.js}}` + +- Clean the `ncc` cache: + +`ncc clean cache`