Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to latest version of Netlify Build #20

Merged
merged 1 commit into from
Apr 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions lib/config.schema.json

This file was deleted.

7 changes: 1 addition & 6 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { promisify } = require('util');
const { resolve } = require('path');
const appendFile = promisify(require('fs').appendFile);
const subfont = require('subfont');
const configSchema = require('./config.schema.json');
const globby = require('globby');

const canonicalRoot = process.env.URL;
Expand All @@ -15,13 +14,9 @@ const immutableHeaders = `
`;

module.exports = {
name: 'subfont',

config: configSchema,

onPostBuild: async ({
constants: { BUILD_DIR },
pluginConfig: { entryPoints, ...subfontConfig }
inputs: { entryPoints, ...subfontConfig }
}) => {
console.log(
`Running subfont version ${require('subfont/package.json').version}`
Expand Down
22 changes: 22 additions & 0 deletions manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: netlify-plugin-subfont
inputs:
- name: recursive
default: true
# description: Follow your links across all pages to optimize the fonts across the antire site
# validation: boolean
- name: inlineFonts
default: false
# description: Inline generated font subsets into their respective @font-face blocks. When set to `false` external font files will be created
# validation: boolean
- name: inlineCss
default: false
# description: Inline generated CSS @font-face blocks into each page. When set to `false` an external CSS file will be created
# validation: boolean
- name: fontDisplay
default: swap
# description: Subfont lets you set CSS font-display value of the optimized subsets. See https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display
# validation: string among auto|block|swap|fallback|optional
- name: entryPoints
default: ['*.html']
# description: An array of glob patterns for pages on your site. Recursive traversal will start from these
# validation: array of strings, minimum 1 item, unique items
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "netlify-plugin-subfont",
"description": "Netlify build plugin to run automated web font loading optimizations on static pages",
"repository": "git://github.com/munter/netlify-plugin-subfont.git",
"bugs": {
"url": "https://github.com/munter/netlify-plugin-subfont/issues"
},
"version": "3.0.1",
"license": "BSD-3-Clause",
"maintainers": [
Expand Down