Skip to content
Prev Previous commit
Next Next commit
Merge branch 'main' into try/google-fonts-capability-option
  • Loading branch information
mikachan authored Jan 12, 2024
commit 62b8e92cedfde6d0ab0130d307ee8ac6f1567507
6 changes: 4 additions & 2 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
const API_URL = "https://www.googleapis.com/webfonts/v1/webfonts?key=";
const API_KEY = process.env.GOOGLE_FONTS_API_KEY;
const GOOGLE_FONTS_CAPABILITY = "WOFF2";
const GOOGLE_FONTS_FILE_PATH = "./output/google-fonts.json";
const GOOGLE_FONTS_WITH_PREVIEWS_FILE_PATH = "./output/google-fonts-with-preview.json";

// File paths
const GOOGLE_FONTS_FILE_PATH = "./releases/gutenberg-17.6/google-fonts.json";
const GOOGLE_FONTS_WITH_PREVIEWS_FILE_PATH = "./releases/gutenberg-17.6/google-fonts-with-preview.json";
const SVG_PREVIEWS_BASE_URL = "https://s.w.org/images/fonts/16.7/previews/";

// font-collection.json schema realted constants
Expand Down
9 changes: 8 additions & 1 deletion src/get_google_fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ const crypto = require('crypto');
/**
* Internal dependencies
*/
const { API_URL, API_KEY, GOOGLE_FONTS_FILE_PATH, GOOGLE_FONTS_CAPABILITY } = require('./constants');
const {
API_URL,
API_KEY,
GOOGLE_FONTS_CAPABILITY,
GOOGLE_FONTS_FILE_PATH,
FONT_COLLECTION_SCHEMA_URL,
FONT_COLLECTION_SCHEMA_VERSION,
} = require('./constants');


function formatCategoryName(slug) {
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.