Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-03-09 19:49:02 +0400
committerisaacs <i@izs.me>2012-03-13 02:04:36 +0400
commitdbae7f2ad92a4427d7289c0227c74b0e74f9164e (patch)
treea9c708d17c7fe1f1010666c2777523cd2420b0d3
parent66db8b243991b71bd1ee2f12d049595deaa8bfea (diff)
wip, not wokring yet, but sort of
-rw-r--r--lib/utils/read-json.js7
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
}
}