Compiling your Node.js application into a single executable.
Master CI | RAM Test | Black‑box Test | Latest Stable | |
---|---|---|---|---|
Windows | https://sourceforge.net/projects/node-compiler/files/v0.9.5/nodec.exe/download | |||
macOS | https://sourceforge.net/projects/node-compiler/files/v0.9.5/nodec-darwin-x64/download | |||
Linux | https://sourceforge.net/projects/node-compiler/files/v0.9.5/nodec-linux-x64/download |
First install the prerequisites:
- SquashFS Tools 4.3
- Python 2.6 or 2.7
- Visual Studio 2015 Update 3, all editions including the Community edition (remember to select "Common Tools for Visual C++ 2015" feature during installation).
Then download the executable nodec.exe and run it from the VC++ or VS Command Prompt.
First install the prerequisites:
- SquashFS Tools 4.3:
brew install squashfs
- Xcode
- You also need to install the
Command Line Tools
via Xcode. You can find this under the menuXcode -> Preferences -> Downloads
- This step will install
gcc
and the related toolchain containingmake
- You also need to install the
- Python 2.6 or 2.7
- GNU Make 3.81 or newer
Then,
curl -L https://sourceforge.net/projects/node-compiler/files/v0.9.5/nodec-darwin-x64/download > nodec
chmod +x nodec
./nodec
First install the prerequisites:
- SquashFS Tools 4.3
gcc
andg++
4.8 or newer, orclang
andclang++
3.4 or newer- Python 2.6 or 2.7
- GNU Make 3.81 or newer
Then,
curl -L https://sourceforge.net/projects/node-compiler/files/v0.9.5/nodec-linux-x64/download > nodec
chmod +x nodec
./nodec
nodec [OPTION]... ENTRANCE
-r, --root=DIR Specifies the path to the root of the application
-o, --output=FILE Specifies the path of the output file
-d, --tmpdir=DIR Specifies the directory for temporary files
--clean-tmpdir Cleans all temporary files that were generated last time
--keep-tmpdir Keeps all temporary files that were generated last time
--make-args=ARGS Passes extra arguments to make
--vcbuild-args=ARGS Passes extra arguments to vcbuild.bat
-n, --npm=FILE Specifies the path of npm
--npm-package=NAME Downloads and compiles the specified npm package
--npm-package-version=VER Downloads and compiles the specified version of the npm package
--debug Enable debug mode
-v, --version Prints the version of nodec and exit
--node-version Prints the version of the Node.js runtime and exit
-h, --help Prints this help and exit
git clone --depth 1 https://github.com/jashkenas/coffeescript.git
cd coffeescript
nodec bin/coffee
./a.out (or a.exe on Windows)
- SquashFS: a compressed read-only filesystem for Linux.
- Libsquash: portable, user-land SquashFS that can be easily linked and embedded within your application.
- Enclose.IO: cloud-based service that compiles your application into a single executable.