This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
site/.eleventy.js

30 lines
597 B
JavaScript

const { mkdirSync } = require('fs')
const cagovBuildSystem = require('@cagov/11ty-build-system')
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 })
}
})
return {
dir: {
input: 'src',
output: 'dist',
layouts: 'layouts',
data: 'data'
}
}
}