Skip to content

Commit af26f53

Browse files
chore: update file to reflect async/await
1 parent 7d337e5 commit af26f53

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

utils/create-quickstarts-snapshot.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ const main = () => {
3030
// get all quickstart config.yml filepaths
3131
const quickstarts = Quickstart.getAll();
3232

33-
const quickstartMutationVariables = quickstarts.map((qs) =>
34-
qs.getMutationVariables(true)
35-
);
33+
quickstarts.map(async (qs) => {
34+
saveQuickstartMutationVariable(await qs.getMutationVariables(true))
35+
});
3636

37-
// save the variables as a JSON file in the `/snapshots` directory
38-
quickstartMutationVariables.forEach(saveQuickstartMutationVariable);
3937
};
4038

41-
main();
39+
if (require.main === module) {
40+
main();
41+
}

0 commit comments

Comments
 (0)