const { mkdirSync } = require('fs') const cagovBuildSystem = require('@cagov/11ty-build-system') const svgContents = require('eleventy-plugin-svg-contents') const faviconPlugin = require('eleventy-favicon') module.exports = (eleventyConfig) => { eleventyConfig.addPlugin(cagovBuildSystem, { processors: { rollup: { file: 'rollup.config.js', watch: ['src/js/**/*.js'] }, postcss: { file: 'postcss.config.js', watch: ['src/**/*'] } }, beforeBuild: () => { mkdirSync('dist/css', { recursive: true }) } }) eleventyConfig.addPassthroughCopy('./src/fonts/') eleventyConfig.addPlugin(svgContents) eleventyConfig.addPlugin(faviconPlugin, { destination: './dist' }) return { dir: { input: 'src', output: 'dist', layouts: 'layouts', data: 'data' } } }