├── .yarnrc ├── gatsby-plugin-webfonts ├── index.js ├── .babelrc ├── src │ ├── components │ │ ├── css.js │ │ ├── preconnect.js │ │ └── preload.js │ ├── __tests__ │ │ └── create-options.test.js │ ├── create-options.js │ ├── gatsby-node.js │ ├── web-fonts.js │ ├── gatsby-ssr.js │ └── modules │ │ ├── selfHosted.js │ │ ├── google.js │ │ └── utils.js ├── .npmignore ├── LICENSE ├── package.json ├── .gitignore └── README.md ├── e2e-tests ├── development-runtime │ ├── README.md │ ├── cypress │ │ ├── support │ │ │ ├── index.js │ │ │ └── commands.js │ │ ├── fixtures │ │ │ └── example.json │ │ ├── integration │ │ │ ├── navigation.js │ │ │ └── fonts.js │ │ └── plugins │ │ │ └── index.js │ ├── plugins │ │ └── gatsby-plugin-top-layout │ │ │ ├── package.json │ │ │ ├── gatsby-ssr.js │ │ │ ├── gatsby-browser.js │ │ │ └── top-layout.js │ ├── cypress.json │ ├── fonts │ │ ├── OpenSans300.woff │ │ ├── OpenSans300.woff2 │ │ └── OpenSans400.woff2 │ ├── src │ │ ├── components │ │ │ ├── link.js │ │ │ └── pro-tip.js │ │ ├── theme.js │ │ └── pages │ │ │ ├── about.js │ │ │ └── index.js │ ├── package.json │ ├── .gitignore │ └── gatsby-config.js ├── production-runtime │ ├── README.md │ ├── cypress │ │ ├── support │ │ │ ├── index.js │ │ │ └── commands.js │ │ ├── fixtures │ │ │ └── example.json │ │ ├── integration │ │ │ ├── navigation.js │ │ │ └── fonts.js │ │ └── plugins │ │ │ └── index.js │ ├── plugins │ │ └── gatsby-plugin-top-layout │ │ │ ├── package.json │ │ │ ├── gatsby-ssr.js │ │ │ ├── gatsby-browser.js │ │ │ └── top-layout.js │ ├── cypress.json │ ├── fonts │ │ ├── OpenSans300.woff │ │ ├── OpenSans300.woff2 │ │ └── OpenSans400.woff2 │ ├── src │ │ ├── components │ │ │ ├── link.js │ │ │ └── pro-tip.js │ │ ├── theme.js │ │ └── pages │ │ │ ├── about.js │ │ │ └── index.js │ ├── package.json │ ├── .gitignore │ └── gatsby-config.js └── path-prefix-prod-runtime │ ├── README.md │ ├── cypress │ ├── support │ │ ├── index.js │ │ └── commands.js │ ├── fixtures │ │ └── example.json │ ├── integration │ │ ├── navigation.js │ │ ├── path-prefix.js │ │ └── fonts.js │ └── plugins │ │ └── index.js │ ├── plugins │ ├── gatsby-plugin-top-layout │ │ ├── package.json │ │ ├── gatsby-ssr.js │ │ ├── gatsby-browser.js │ │ └── top-layout.js │ └── src │ │ ├── components │ │ ├── link.js │ │ └── pro-tip.js │ │ ├── theme.js │ │ └── pages │ │ ├── index.js │ │ └── about.js │ ├── cypress.json │ ├── fonts │ ├── OpenSans300.woff │ ├── OpenSans300.woff2 │ └── OpenSans400.woff2 │ ├── src │ ├── components │ │ ├── link.js │ │ └── pro-tip.js │ ├── theme.js │ └── pages │ │ ├── about.js │ │ └── index.js │ ├── package.json │ ├── gatsby-config.js │ └── .gitignore ├── lerna.json ├── .prettierrc.js ├── .eslintignore ├── .eslintrc.js ├── README.md ├── LICENSE ├── .gitignore ├── package.json └── .circleci └── config.yml /.yarnrc: -------------------------------------------------------------------------------- 1 | --install.ignore-engines true -------------------------------------------------------------------------------- /gatsby-plugin-webfonts/index.js: -------------------------------------------------------------------------------- 1 | //noop 2 | -------------------------------------------------------------------------------- /e2e-tests/development-runtime/README.md: -------------------------------------------------------------------------------- 1 | # gatsby-plugin-webfonts 2 | -------------------------------------------------------------------------------- /e2e-tests/production-runtime/README.md: -------------------------------------------------------------------------------- 1 | # gatsby-plugin-webfonts 2 | -------------------------------------------------------------------------------- /e2e-tests/path-prefix-prod-runtime/README.md: -------------------------------------------------------------------------------- 1 | # gatsby-plugin-webfonts 2 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "npmClient": "yarn", 3 | "useWorkspaces": true, 4 | "version": "2.3.2" 5 | } 6 | -------------------------------------------------------------------------------- /e2e-tests/development-runtime/cypress/support/index.js: -------------------------------------------------------------------------------- 1 | import "gatsby-cypress"; 2 | import "./commands"; 3 | -------------------------------------------------------------------------------- /e2e-tests/production-runtime/cypress/support/index.js: -------------------------------------------------------------------------------- 1 | import "gatsby-cypress"; 2 | import "./commands"; 3 | -------------------------------------------------------------------------------- /e2e-tests/path-prefix-prod-runtime/cypress/support/index.js: -------------------------------------------------------------------------------- 1 | import "gatsby-cypress"; 2 | import "./commands"; 3 | -------------------------------------------------------------------------------- /e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gatsby-plugin-top-layout" 3 | } 4 | -------------------------------------------------------------------------------- /e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gatsby-plugin-top-layout" 3 | } 4 | -------------------------------------------------------------------------------- /e2e-tests/path-prefix-prod-runtime/plugins/gatsby-plugin-top-layout/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gatsby-plugin-top-layout" 3 | } 4 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: true, 3 | singleQuote: false, 4 | tabWidth: 2, 5 | trailingComma: "all", 6 | }; -------------------------------------------------------------------------------- /e2e-tests/development-runtime/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:8000", 3 | "failOnStatusCode": false, 4 | "video": false 5 | } 6 | -------------------------------------------------------------------------------- /e2e-tests/production-runtime/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:9000", 3 | "failOnStatusCode": false, 4 | "video": false 5 | } 6 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /coverage 3 | /e2e-tests/**/public/ 4 | 5 | /gatsby-plugin-webfonts/**/*.js 6 | !/gatsby-plugin-webfonts/src/**/*.js 7 | 8 | node_modules -------------------------------------------------------------------------------- /e2e-tests/path-prefix-prod-runtime/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:9000/prefix/", 3 | "failOnStatusCode": false, 4 | "video": false 5 | } 6 | -------------------------------------------------------------------------------- /e2e-tests/development-runtime/fonts/OpenSans300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hupe1980/gatsby-plugin-webfonts/HEAD/e2e-tests/development-runtime/fonts/OpenSans300.woff -------------------------------------------------------------------------------- /e2e-tests/development-runtime/fonts/OpenSans300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hupe1980/gatsby-plugin-webfonts/HEAD/e2e-tests/development-runtime/fonts/OpenSans300.woff2 -------------------------------------------------------------------------------- /e2e-tests/development-runtime/fonts/OpenSans400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hupe1980/gatsby-plugin-webfonts/HEAD/e2e-tests/development-runtime/fonts/OpenSans400.woff2 -------------------------------------------------------------------------------- /e2e-tests/production-runtime/fonts/OpenSans300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hupe1980/gatsby-plugin-webfonts/HEAD/e2e-tests/production-runtime/fonts/OpenSans300.woff -------------------------------------------------------------------------------- /e2e-tests/production-runtime/fonts/OpenSans300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hupe1980/gatsby-plugin-webfonts/HEAD/e2e-tests/production-runtime/fonts/OpenSans300.woff2 -------------------------------------------------------------------------------- /e2e-tests/production-runtime/fonts/OpenSans400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hupe1980/gatsby-plugin-webfonts/HEAD/e2e-tests/production-runtime/fonts/OpenSans400.woff2 -------------------------------------------------------------------------------- /e2e-tests/path-prefix-prod-runtime/fonts/OpenSans300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hupe1980/gatsby-plugin-webfonts/HEAD/e2e-tests/path-prefix-prod-runtime/fonts/OpenSans300.woff -------------------------------------------------------------------------------- /e2e-tests/path-prefix-prod-runtime/fonts/OpenSans300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hupe1980/gatsby-plugin-webfonts/HEAD/e2e-tests/path-prefix-prod-runtime/fonts/OpenSans300.woff2 -------------------------------------------------------------------------------- /e2e-tests/path-prefix-prod-runtime/fonts/OpenSans400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hupe1980/gatsby-plugin-webfonts/HEAD/e2e-tests/path-prefix-prod-runtime/fonts/OpenSans400.woff2 -------------------------------------------------------------------------------- /gatsby-plugin-webfonts/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "babel-preset-gatsby-package", 5 | { 6 | "browser": true 7 | } 8 | ] 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /gatsby-plugin-webfonts/src/components/css.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export default function Css({ css }) { 4 | return