Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
5918ee7a
Commit
5918ee7a
authored
Dec 16, 2014
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test for NPM_CONFIG_OPTIONAL and debug output for all npm config vars
parent
9d46aaf1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
1 deletion
+46
-1
compile
bin/compile
+1
-1
test
bin/test
+26
-0
README.md
test/optional-dependencies/README.md
+1
-0
package.json
test/optional-dependencies/package.json
+18
-0
No files found.
bin/compile
View file @
5918ee7a
...
...
@@ -80,7 +80,7 @@ info "node_modules cached: $modules_cached"
echo
""
info
"NPM_CONFIG_PRODUCTION=
$NPM_CONFIG_PRODUCTION
"
printenv
|
grep
NPM_CONFIG | indent
info
"DISABLE_BUILD_CACHE=
$DISABLE_BUILD_CACHE
"
source
$bp_dir
/bin/warnings.sh
...
...
bin/test
View file @
5918ee7a
...
...
@@ -188,6 +188,32 @@ testDevDependencies() {
assertCapturedSuccess
}
testOptionalDependencies
()
{
env_dir
=
$(
mktmpdir
)
#echo "true" > $env_dir/NPM_CONFIG_OPTIONAL
compile
"optional-dependencies"
"
$(
mktmpdir
)
"
$env_dir
assertNotCaptured
"NPM_CONFIG_OPTIONAL"
assertCaptured
"less"
assertCaptured
"mime"
assertCaptured
"mkdirp"
assertCaptured
"clean-css"
assertCaptured
"request"
assertCapturedSuccess
}
testNoOptionalDependencies
()
{
env_dir
=
$(
mktmpdir
)
echo
"false"
>
$env_dir
/NPM_CONFIG_OPTIONAL
compile
"optional-dependencies"
"
$(
mktmpdir
)
"
$env_dir
assertCaptured
"NPM_CONFIG_OPTIONAL=false"
assertCaptured
"less"
assertNotCaptured
"mime"
assertNotCaptured
"mkdirp"
assertNotCaptured
"clean-css"
assertNotCaptured
"request"
assertCapturedSuccess
}
testDisableCache
()
{
cache
=
$(
mktmpdir
)
env_dir
=
$(
mktmpdir
)
...
...
test/optional-dependencies/README.md
0 → 100644
View file @
5918ee7a
A fake README, to keep npm from polluting stderr.
\ No newline at end of file
test/optional-dependencies/package.json
0 → 100644
View file @
5918ee7a
{
"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"
:
{
"less"
:
"1.7.0"
},
"engines"
:
{
"node"
:
"0.10.x"
},
"scripts"
:
{
"start"
:
"node foo.js"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment