diff options
author | isaacs <i@izs.me> | 2012-03-09 19:49:02 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-03-13 02:04:36 +0400 |
commit | dbae7f2ad92a4427d7289c0227c74b0e74f9164e (patch) | |
tree | a9c708d17c7fe1f1010666c2777523cd2420b0d3 | |
parent | 66db8b243991b71bd1ee2f12d049595deaa8bfea (diff) |
wip, not wokring yet, but sort of
-rw-r--r-- | lib/utils/read-json.js | 7 |
1 files 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 } } |