From 941d1f98a3eb3a1a224a033a4c157d4a9c02ec85 Mon Sep 17 00:00:00 2001 From: Fernando Montoya Date: Mon, 26 Feb 2018 16:08:47 +0100 Subject: [PATCH] feat(compat): include fetch_compat in fetch scripts --- src/scripts/fetch.sh | 3 +++ src/scripts/fetch_compat.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/scripts/fetch.sh b/src/scripts/fetch.sh index be69b0acfd0d..415d5ad407d2 100644 --- a/src/scripts/fetch.sh +++ b/src/scripts/fetch.sh @@ -21,3 +21,6 @@ node ./src/scripts/fetch_supporters.js # Fetch starter kits node ./src/scripts/fetch_starter_kits.js + +# Fetch packages for compatibility page +nnode ./src/scripts/fetch_compat.js diff --git a/src/scripts/fetch_compat.js b/src/scripts/fetch_compat.js index 94081e192081..8e7a6918784b 100644 --- a/src/scripts/fetch_compat.js +++ b/src/scripts/fetch_compat.js @@ -50,7 +50,11 @@ async function main() { // TODO: Write to disk the JSON file that gets fetched and then add to script workflow. // This should be saved in ./src/Compatibility/packages.json - fs.writeFileSync('./src/components/Compatibility/packages.json', JSON.stringify(packageFiles, null, 2), { encoding: "utf8" }) + fs.writeFile('./src/components/Compatibility/packages.json', JSON.stringify(packageFiles, null, 2), { encoding: "utf8" }, err => { + if (err) { + console.error('Failed to write compatible packages file: ', err) + } else console.log('Fetched 1 file: packages.json') + }) } catch (e) { console.error(e); }