From dbae7f2ad92a4427d7289c0227c74b0e74f9164e Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 9 Mar 2012 07:49:02 -0800 Subject: wip, not wokring yet, but sort of --- lib/utils/read-json.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/utils/read-json.js b/lib/utils/read-json.js index ceeebdf27..50e8415cd 100644 --- a/lib/utils/read-json.js +++ b/lib/utils/read-json.js @@ -36,13 +36,13 @@ function readJson (jsonFile, opts, cb) { , serverjs = null , gypfile = null - if (options.gypfile !== null && opts.gypfile !== undefined) { + if (opts.gypfile !== null && opts.gypfile !== undefined) { gypfile = opts.gypfile next() } else { fs.readFile( path.join(path.dirname(jsonFile), "bindings.gyp") , function (er, data) { - opts.gypfile = !er + gypfile = opts.gypfile = !er next() }) } @@ -349,7 +349,8 @@ function processObject (opts, cb) { return function (er, json) { if (opts.gypfile && !json.prebuilt) { log.verbose([json.prebuilt, opts], "has bindings.gyp") if (!scripts.install && !scripts.preinstall) { - scripts.preinstall = "node-gyp clean || (exit 0); node-gyp configure ; node-gyp build" + scripts.preinstall = "node-gyp clean || (exit 0)" + scripts.install = "node-gyp configure && node-gyp build" json.scripts = scripts } } -- cgit v1.2.3