persist npm cache

As of npm@5 supports offline install just what yarn does.
This commit is contained in:
Eko Eryanto 2017-05-31 08:57:27 -07:00 committed by GitHub
parent db7d2bcafb
commit f78dd1130d

View File

@ -14,15 +14,16 @@
}, },
"extract_dir": "nodejs", "extract_dir": "nodejs",
"persist": [ "persist": [
"bin" "bin",
"cache"
], ],
"env_add_path": [ "env_add_path": [
".", ".",
"bin" "bin"
], ],
"post_install": " "post_install": "
# Set npm prefix to install modules inside bin # Set npm prefix to install modules inside bin and npm cache so they persist
Set-Content -Value \"prefix=$dir\\bin\" -Path $dir\\node_modules\\npm\\npmrc", Set-Content -Value \"prefix=$dir\\bin`ncache=$dir\\cache\" -Path $dir\\node_modules\\npm\\npmrc",
"checkver": { "checkver": {
"url": "https://nodejs.org/en/download/current/", "url": "https://nodejs.org/en/download/current/",
"re": "Current version: <strong>v([\\d.]+)</strong>" "re": "Current version: <strong>v([\\d.]+)</strong>"