From 6e67dfbb9865fe812145b7055302b3f9fa11dff5 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Tue, 24 May 2022 03:56:55 +0100 Subject: [PATCH] Fix --- beta/.gitignore | 5 +++++ beta/scripts/downloadFonts.js | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 beta/scripts/downloadFonts.js diff --git a/beta/.gitignore b/beta/.gitignore index 35b7a4ac..c842b12a 100644 --- a/beta/.gitignore +++ b/beta/.gitignore @@ -33,3 +33,8 @@ yarn-error.log* # vercel .vercel + +# external fonts +public/fonts/Optimistic_Display_W_Lt.woff2 +public/fonts/Optimistic_Display_W_Md.woff2 +public/fonts/Optimistic_Display_W_Bd.woff2 diff --git a/beta/scripts/downloadFonts.js b/beta/scripts/downloadFonts.js new file mode 100644 index 00000000..098513ac --- /dev/null +++ b/beta/scripts/downloadFonts.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + +const {execSync} = require('child_process'); + +// So that we don't need to check them into the repo. +// Serving them from the same domain is better for perf so do this on deploy. +execSync( + 'curl https://conf.reactjs.org/fonts/Optimistic_Display_W_Lt.woff2 --output public/fonts/Optimistic_Display_W_Lt.woff2' +); +execSync( + 'curl https://conf.reactjs.org/fonts/Optimistic_Display_W_Md.woff2 --output public/fonts/Optimistic_Display_W_Md.woff2' +); +execSync( + 'curl https://conf.reactjs.org/fonts/Optimistic_Display_W_Bd.woff2 --output public/fonts/Optimistic_Display_W_Bd.woff2' +);