From bea9181be6848147551fe2fa5a45619a60d72938 Mon Sep 17 00:00:00 2001 From: Craig Condon Date: Fri, 1 Feb 2013 11:36:47 -0800 Subject: [PATCH] properly parse relative path --- .npmignore | 0 bin/nexe | 7 ++++++- examples/hello-world/makefile | 2 +- package.json | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..e69de29 diff --git a/bin/nexe b/bin/nexe index 7b29281..e429ce0 100755 --- a/bin/nexe +++ b/bin/nexe @@ -23,8 +23,13 @@ options('r', { }).argv; +function toRelative(pt) { + return path.normalize(pt.replace(/^\.\//, process.cwd() + "/")); +} -require('../lib').compile({ input: argv.i, output: argv.o, runtime: argv.r }, function(error) { + + +require('../lib').compile({ input: toRelative(argv.i), output: toRelative(argv.o), runtime: argv.r }, function(error) { if(error) console.log(error.message); }); \ No newline at end of file diff --git a/examples/hello-world/makefile b/examples/hello-world/makefile index b70bd09..9bfedb5 100644 --- a/examples/hello-world/makefile +++ b/examples/hello-world/makefile @@ -1,2 +1,2 @@ all: - nexe -o ./hello-world.nex \ No newline at end of file + nexe -i ./index.js -o ./hello-world.nex -r 0.8.18 \ No newline at end of file diff --git a/package.json b/package.json index 0f7ed1c..44952cd 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Craig Condon ", "name": "nexe", "description": "Roll node.s applications into a single executable", - "version": "0.1.0", + "version": "0.1.1", "repository": { "type": "git", "url": "git://github.com/crcn/nexe.git"