Bundle a Node.js application into a temporary directory and run it for testing

ncc

  • Compile a Node.js application into a single file.
    Supports TypeScript, binary addons and dynamic requires.
    More information: <https://github.com/vercel/ncc>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

ncc run {{path/to/file.js}}

click the source code to copy install ncc on any operating system with command-not-found.com