From 424a7bdcbb65575fa252b9a86e4e183e6f9ceb80 Mon Sep 17 00:00:00 2001 From: Alex Whitman Date: Sun, 18 Aug 2013 18:16:23 +0100 Subject: [PATCH 1/3] Unshift 'node' onto process.argv The node executable is the first value in argv. This was missing after compiling. --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index cfd9e50..fbfbc9e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -214,7 +214,7 @@ function monkeyPatchNodejs(node, next) { if(~content.indexOf('nexe')) return this(); fs.writeFile(nodejsPath, - content.replace(/\(function\(process\) \{/,'(function(process){ \n process._eval = \'require("nexe");\'; '), + content.replace(/\(function\(process\) \{/,'(function(process) {\n process._eval = \'require("nexe");\';\n process.argv.unshift("node");\n'), "utf8", this); }), From 46503af805d09afae391c70382d3bc702adae2c9 Mon Sep 17 00:00:00 2001 From: Samyak Bhuta Date: Mon, 14 Oct 2013 16:28:08 +0530 Subject: [PATCH 2/3] 'nexe', can be installed globally. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77e5f05..429c2de 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Compile javascript **with** node.js. This allows you to move your executable aro Via NPM: ```bash - npm install nexe + npm install nexe [-g] ``` Or git: From 9007a080cfd4c0b4fb1d9e0b7e5aee7f35dc2257 Mon Sep 17 00:00:00 2001 From: Samyak Bhuta Date: Mon, 14 Oct 2013 18:43:20 +0530 Subject: [PATCH 3/3] Added preference for global install. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 471a7d2..05560d2 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "mkdirp": "0.3.x", "sardines": "0.4.x" }, + "preferGlobal": "true", "bin": { "nexe": "./bin/nexe" },