Skip to content

Commit

Permalink
feat(compat): include fetch_compat in fetch scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
montogeek committed Feb 26, 2018
1 parent 0f664fb commit 941d1f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/scripts/fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion src/scripts/fetch_compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

1 comment on commit 941d1f9

@montogeek
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue #1852

Please sign in to comment.