merge: master browserify
This commit is contained in:
+2
-2
@@ -5,5 +5,5 @@ src
|
||||
nexe.exe
|
||||
nexe
|
||||
npm-debug.log
|
||||
examples/**/src
|
||||
examples/**/out.nex
|
||||
# test/**/src
|
||||
test/**/out.nex
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
[](https://gitter.im/jaredallard/nexe?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://david-dm.org/crcn/nexe)
|
||||
[](http://waffle.io/jaredallard/nexe)
|
||||
|
||||
# NOTICE: Node 5.x.x is broken right now.
|
||||
|
||||
Nexe is a command-line utility that compiles your Node.js application into a single executable file.
|
||||
|
||||

|
||||
|
||||
+1
-3
@@ -22,6 +22,7 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
**/
|
||||
|
||||
var mdeps = require("module-deps"),
|
||||
path = require("path"),
|
||||
spawn = require('child_process').spawn,
|
||||
@@ -84,6 +85,3 @@ function bundle (input, nc, complete) {
|
||||
complete();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = bundle;
|
||||
|
||||
+11
-4
@@ -277,13 +277,12 @@ exports.compile = function (options, complete) {
|
||||
*/
|
||||
|
||||
function _downloadNode(version, directory, nodeConfigureArgs, nodeMakeArgs, complete) {
|
||||
|
||||
var nodeFileDir = path.resolve(path.join(directory, framework, version)), // fixes #107, was process.cwd(), + rest.
|
||||
nodeFilePath = path.resolve(path.join(nodeFileDir, framework + "-" + version + ".tar.gz"));
|
||||
|
||||
|
||||
// might already be downloaded, and unzipped
|
||||
if (_getNodeCompiler(nodeFileDir, complete)) {
|
||||
if (_getNodeCompiler(nodeFileDir, nodeConfigureArgs, nodeMakeArgs, complete)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -547,7 +546,13 @@ function _monkeyPatchMainJs (compiler, complete) {
|
||||
return ~content.indexOf("nexe");
|
||||
},
|
||||
function (content, next) {
|
||||
next(null, content.replace(/\(function\(process\) \{/,'(function(process) {\n process._eval = \'require("nexe");\';\n process.argv.splice(1, 0, "nexe.js");\n'))
|
||||
next(null, content.replace(/\(function\(process\) \{/,'\
|
||||
(function(process) {\n\
|
||||
process._eval = \'require("nexe");\';\n\
|
||||
if (process.argv[1] !== "nexe.js") {\n\
|
||||
process.argv.splice(1, 0, "nexe.js");\n\
|
||||
}\n\
|
||||
'))
|
||||
},
|
||||
complete
|
||||
);
|
||||
@@ -564,7 +569,7 @@ function _monkeyPatchChildProcess(compiler, complete) {
|
||||
return ~content.indexOf("--child_process");
|
||||
},
|
||||
function (content, next) {
|
||||
next(null, content.replace(/return spawn\(/, 'args.unshift("--child_process");\n return spawn('));
|
||||
next(null, content.replace(/return spawn\(/, 'args.unshift("nexe.js", "--child_process");\n return spawn('));
|
||||
},
|
||||
complete
|
||||
);
|
||||
@@ -684,6 +689,8 @@ exports.package = function(path, options) {
|
||||
input: (_package.nexe.input || options.i),
|
||||
output: (_package.nexe.output || options.o),
|
||||
flags: (_package.nexe.runtime.ignoreFlags || options.f),
|
||||
nodeConfigureArgs: (_package.nexe.runtime.nodeConfigureArgs || []),
|
||||
nodeMakeArgs: (_package.nexe.runtime.nodeMakeArgs || []),
|
||||
resourceFiles: (_package.nexe.resourceFiles),
|
||||
nodeVersion: (_package.nexe.runtime.version || options.r),
|
||||
nodeConfigureArgs: (_package.nexe.runtime.nodeConfigureArgs || []),
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
"ignoreFlags": true
|
||||
}
|
||||
},
|
||||
"preferGlobal": "true",
|
||||
"preferGlobal": true,
|
||||
"bin": {
|
||||
"nexe": "./bin/nexe"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user