(config = {})
| 28 | }; |
| 29 | |
| 30 | const buildCSS = (config = {}) => { |
| 31 | for (const file of config.entryPoints) { |
| 32 | const css = fs.readFileSync(file, "utf-8"); |
| 33 | postcss(postcssConfig.plugins) |
| 34 | .process(css, { from: file, to: `_site/${file}` }) |
| 35 | .then((res) => { |
| 36 | fs.mkdirSync("_site/css", { recursive: true }); |
| 37 | fs.writeFileSync(`_site/${file}`, res.css); |
| 38 | }); |
| 39 | } |
| 40 | }; |
| 41 | |
| 42 | export default (eleventyConfig) => { |
| 43 | const jsEntryPoints = globSync("script/*.[tj]s").map((p) => path.relative(process.cwd(), p)); |