Skip to content

Commit

Permalink
gatsby-plugin-subfong: Refactor default option
Browse files Browse the repository at this point in the history
  • Loading branch information
palindrom615 committed Feb 27, 2020
1 parent 8ddd6d4 commit 32d9dc2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/gatsby-plugin-subfont/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ const subfont = require(`subfont`)
exports.onPostBuild = async ({ store }, options) => {
const root = path.join(store.getState().program.directory, `public`)

const urlPaths = [`/`]

await subfont(
{
root: `file://${root}`,
root,
inPlace: true,
inlineCss: true,
silent: true,
inputFiles: urlPaths.map(currentPath =>
path.join(root, currentPath, `index.html`)
),
inputFiles: [path.join(root, `index.html`)],
...options,
},
console
Expand Down

0 comments on commit 32d9dc2

Please sign in to comment.