Commit e6703624 authored by Zeke Sikelianos's avatar Zeke Sikelianos

Merge pull request #79 from gemfury/master

Add support for custom .npmrc
parents 424a605b 991ceb99
......@@ -66,7 +66,7 @@ fi
# Make npm output to STDOUT instead of its default STDERR
status "Installing dependencies"
npm install --production 2>&1 | indent
npm install --userconfig $build_dir/.npmrc --production 2>&1 | indent
status "Pruning dependencies not specified in package.json"
npm prune 2>&1 | indent
......
......@@ -84,6 +84,13 @@ testModulesCheckedIn() {
assertCapturedSuccess
}
testUserConfig() {
compile "userconfig"
assertCaptured "https://www.google.com/"
assertCaptured "registry error"
assertCapturedError 1 ""
}
# Pending Tests
# testNodeBinariesAddedToPath() {
......@@ -135,7 +142,7 @@ compile_dir=""
compile() {
compile_dir=$(mktmpdir)
cp -r ${bp_dir}/test/$1/* ${compile_dir}/
cp -r ${bp_dir}/test/$1/. ${compile_dir}
capture ${bp_dir}/bin/compile ${compile_dir} ${2:-$(mktmpdir)}
}
......
; Any URL that throws 404s
registry = "https://www.google.com/"
strict-ssl = false
; Ensure fast failure
fetch-retries = 0
fetch-retry-factor = 0
fetch-retry-mintimeout = 0
A fake README, to keep npm from polluting stderr.
\ No newline at end of file
{
"name": "node-buildpack-test-app",
"version": "0.0.1",
"description": "node buildpack integration test app",
"repository" : {
"type" : "git",
"url" : "http://github.com/example/example.git"
},
"dependencies": {
"something-not-in-cache": "*"
},
"engines": {
"node": "~0.10.0"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment