ncc: add page (#5447)

add-set-more-info-link.py
Axel Navarro 2021-03-15 15:32:48 -03:00 committed by GitHub
parent 160721def0
commit 35d4a1337f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 0 deletions

29
pages/common/ncc.md Normal file
View File

@ -0,0 +1,29 @@
# ncc
> Compile a Node.js application into a single file.
> Supports TypeScript, binary addons and dynamic requires.
> More information: <https://github.com/vercel/ncc>.
- 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`