↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

nexe

Nexe is a command-line utility that compiles a Node.js application into a single executable file. The page presents it as a way to distribute binaries without Node or npm, run apps with different runtimes, and control builds across platforms.

Reading notes
#

  • Compiles Node.js applications into a single executable.
  • Allows distributing binaries without needing Node or npm.
  • Supports self-contained applications and multiple applications with different runtimes.
  • Mentions idempotent builds, faster deploys, version rollback, and a flexible build pipeline.
  • Supports cross-platform builds.
  • Allows adding resources to the binary with -r and reading them with fs.readFile or fs.readFileSync.
  • By default it tries to download a precompiled executable; if necessary, it uses --build to compile from source code.
  • Documents options such as input, output, target, bundle, name, cwd, build, resources, patches and plugins.
  • The Node.js API shows compile({ input, build: true, patches: [...] }) and the use of setFileContentsAsync to modify source files.
  • For native modules, the native binaries need to be sent together with the generated executable.