From f78dd1130da0a0326f08aa487c2a26dff7b61ef0 Mon Sep 17 00:00:00 2001 From: Eko Eryanto Date: Wed, 31 May 2017 08:57:27 -0700 Subject: [PATCH] persist npm cache As of npm@5 supports offline install just what yarn does. --- nodejs.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nodejs.json b/nodejs.json index 37a76c4b19..d3f772baa1 100644 --- a/nodejs.json +++ b/nodejs.json @@ -14,15 +14,16 @@ }, "extract_dir": "nodejs", "persist": [ - "bin" + "bin", + "cache" ], "env_add_path": [ ".", "bin" ], "post_install": " -# Set npm prefix to install modules inside bin -Set-Content -Value \"prefix=$dir\\bin\" -Path $dir\\node_modules\\npm\\npmrc", +# Set npm prefix to install modules inside bin and npm cache so they persist +Set-Content -Value \"prefix=$dir\\bin`ncache=$dir\\cache\" -Path $dir\\node_modules\\npm\\npmrc", "checkver": { "url": "https://nodejs.org/en/download/current/", "re": "Current version: v([\\d.]+)"