Try Node.js Compiler
https://github.com/pmq20/node-compiler
I have made a new project called node-compiler to compile your Node.js project into one single executable.
It is better than disclose in that it never runs slowly for the first time, since your source code is compiled together with the Node.js interpreter, just like the standard Node.js libraries.
Additionally, it redirects file/directory requests transparently to the memory instead of to the file system at runtime. So that no source code is required to run the compiled product.
Disclose
Pack your Node.js project into an executable without recompiling Node.js.
Installation
$ gem install disclose
Dependencies
Make sure that your system has the following components,
- tar
- gzip
- xxd
- gcc
or on Windows,
-
tar.exe
, which could be installed by gnuwin32 -
gzip.exe
, which could be installed by gnuwin32 -
xxd.exe
, which could be installed by gvim -
gcc.exe
, which could be installed by mingw-w64
The generated executable file is guaranteed to have no external dependencies.
Usage
$ disclose [node_path] [project_path]
Example
On Windows,
> disclose "C:\Program Files\nodejs\node.exe" "C:\Users\pmq20\AppData\Roaming\npm\node_modules\coffee-script"
On Unix,
$ disclose /usr/local/bin/node /usr/local/lib/node_modules/coffee-script
Hints
- We recommend using
npm3
to generate thenode_modules
folder before packing
License
The gem is available as open source under the terms of the MIT License.