merge: master browserify

This commit is contained in:
Jared Allard
2016-01-22 12:49:55 -08:00
5 changed files with 17 additions and 10 deletions
+2 -2
View File
@@ -5,5 +5,5 @@ src
nexe.exe
nexe
npm-debug.log
examples/**/src
examples/**/out.nex
# test/**/src
test/**/out.nex
+2
View File
@@ -3,6 +3,8 @@
[![Join the chat at https://gitter.im/crcn/nexe](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jaredallard/nexe?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Dependency Status](https://david-dm.org/jaredallard/nexe.svg)](https://david-dm.org/crcn/nexe)
[![Stories in Ready](https://badge.waffle.io/jaredallard/nexe.svg?label=ready&title=Ready)](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.
![screen shot 2014-02-28 at 10 32 54 am](https://f.cloud.github.com/assets/757408/2296993/c276f7b6-a0a6-11e3-86d3-e6c5feba2a85.png)
+1 -3
View File
@@ -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
View File
@@ -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
View File
@@ -45,7 +45,7 @@
"ignoreFlags": true
}
},
"preferGlobal": "true",
"preferGlobal": true,
"bin": {
"nexe": "./bin/nexe"
},