From c3b97385f9dfcf4750b60c1a0f944a7f2305b9c6 Mon Sep 17 00:00:00 2001 From: Eko Eryanto Date: Fri, 2 Jun 2017 04:18:56 +0700 Subject: [PATCH] Persist cache (#1537) * Persist cache * Add persistent global bin to yarn --- yarn.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/yarn.json b/yarn.json index e6ca27d8e6..99d828d90c 100644 --- a/yarn.json +++ b/yarn.json @@ -13,7 +13,18 @@ }, "url": "https://yarnpkg.com/downloads/0.24.6/yarn-0.24.6.msi", "hash": "00f1aab358abe90eaaeb66c31fdf7342822dfba96a781e6995ffb0d4c68ad330", - "env_add_path": "Yarn\\bin", + "persist": [ + "cache", + "bin" + ], + "post_install": " + yarn config set cache \"$persist_dir\\cache\" + yarn config set prefix \"$persist_dir\\bin\" + ", + "env_add_path": [ + "bin", + "Yarn\\bin" + ], "checkver": { "url": "https://yarnpkg.com/latest-version", "re": "([\\d.]+)"