Skip to content

Commit

Permalink
Fix build script (#2154)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Jan 10, 2020
1 parent 30c01bb commit 52af0d9
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions scripts/download-sponsors.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ fetch(graphqlEndpoint, {
.then(res => res.json())
.then(res => res.data.account.orders.nodes)
.then(nodes =>
nodes.map(node => ({
tier: node.tier.slug,
name: node.fromAccount.name,
slug: node.fromAccount.slug,
website: node.fromAccount.website,
avatar: node.fromAccount.imageUrl,
twitterHandle: node.fromAccount.twitterHandle,
description: node.fromAccount.description,
}))
nodes
.filter(node => !!node.tier)
.map(node => ({
tier: node.tier.slug,
name: node.fromAccount.name,
slug: node.fromAccount.slug,
website: node.fromAccount.website,
avatar: node.fromAccount.imageUrl,
twitterHandle: node.fromAccount.twitterHandle,
description: node.fromAccount.description,
}))
)
.then(sponsors => JSON.stringify(sponsors, null, 2))
.then(sponsorsJson => {
Expand Down

0 comments on commit 52af0d9

Please sign in to comment.