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
b687474e
Unverified
Commit
b687474e
authored
Jan 31, 2018
by
Jeremy Morrell
Committed by
GitHub
Jan 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the default cache directories for npm and yarn (#511)
Export cache config vars
parent
74a72210
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
compile
bin/compile
+4
-4
No files found.
bin/compile
View file @
b687474e
...
...
@@ -20,10 +20,6 @@ ENV_DIR=${3:-}
BP_DIR
=
$(
cd
$(
dirname
${
0
:-})
;
cd
..
;
pwd
)
STDLIB_FILE
=
$(
mktemp
-t
stdlib.XXXXX
)
### Configure package manager cache directories
[
!
"
$YARN_CACHE_FOLDER
"
]
&&
YARN_CACHE_FOLDER
=
$(
mktemp
-d
-t
yarncache.XXXXX
)
[
!
"
$NPM_CONFIG_CACHE
"
]
&&
NPM_CONFIG_CACHE
=
$(
mktemp
-d
-t
npmcache.XXXXX
)
### Load dependencies
curl
--silent
--retry
5
--retry-max-time
15
'https://lang-common.s3.amazonaws.com/buildpack-stdlib/v7/stdlib.sh'
>
"
$STDLIB_FILE
"
...
...
@@ -89,6 +85,10 @@ cd $BUILD_DIR
create_env
# can't pipe the whole thing because piping causes subshells, preventing exports
list_node_config | output
"
$LOG_FILE
"
### Configure package manager cache directories
[
!
"
$YARN_CACHE_FOLDER
"
]
&&
export
YARN_CACHE_FOLDER
=
$(
mktemp
-d
-t
yarncache.XXXXX
)
[
!
"
$NPM_CONFIG_CACHE
"
]
&&
export
NPM_CONFIG_CACHE
=
$(
mktemp
-d
-t
npmcache.XXXXX
)
install_bins
()
{
local
node_engine
=
$(
read_json
"
$BUILD_DIR
/package.json"
".engines.node"
)
local
iojs_engine
=
$(
read_json
"
$BUILD_DIR
/package.json"
".engines.iojs"
)
...
...
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