From 15d98b4cebab5792abaf8a62d1eb5b259c27c347 Mon Sep 17 00:00:00 2001 From: Nigel Breslaw Date: Mon, 22 Apr 2024 11:00:43 +0300 Subject: [PATCH] feature: Minifier also adds the demo mode JSON (#1369) --- minifier/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/minifier/index.ts b/minifier/index.ts index 901ddc52..96c934a7 100644 --- a/minifier/index.ts +++ b/minifier/index.ts @@ -717,8 +717,17 @@ async function main() { const savePath = path.join(__dirname, `json/manifest.json`); await saveToJsonFile(uniqueJsonManifest, savePath); + + // To avoid committing a 3MB JSON blob into this repo download the demo.json file + // from the unintuitive.com site and save it to the json folder. This is only used + // for the apps demo mode. + const demoJsonUrl = "https://unintuitive.com/demo.json"; + const demoJson = await downloadJsonFile(demoJsonUrl); + const saveDemoPath = path.join(__dirname, `json/demo.json`); + await saveToJsonFile(demoJson, saveDemoPath); } catch (error) { console.error(error); + process.exit(1); } }