Skip to content

Commit 941d1f9

Browse files
committed
feat(compat): include fetch_compat in fetch scripts
1 parent 0f664fb commit 941d1f9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/scripts/fetch.sh

+3
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ node ./src/scripts/fetch_supporters.js
2121

2222
# Fetch starter kits
2323
node ./src/scripts/fetch_starter_kits.js
24+
25+
# Fetch packages for compatibility page
26+
nnode ./src/scripts/fetch_compat.js

src/scripts/fetch_compat.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ async function main() {
5050

5151
// TODO: Write to disk the JSON file that gets fetched and then add to script workflow.
5252
// This should be saved in ./src/Compatibility/packages.json
53-
fs.writeFileSync('./src/components/Compatibility/packages.json', JSON.stringify(packageFiles, null, 2), { encoding: "utf8" })
53+
fs.writeFile('./src/components/Compatibility/packages.json', JSON.stringify(packageFiles, null, 2), { encoding: "utf8" }, err => {
54+
if (err) {
55+
console.error('Failed to write compatible packages file: ', err)
56+
} else console.log('Fetched 1 file: packages.json')
57+
})
5458
} catch (e) {
5559
console.error(e);
5660
}

0 commit comments

Comments
 (0)