MCPcopy
hub / github.com/remoteintech/remote-jobs / buildCss

Function buildCss

src/_config/events/build-css.js:11–28  ·  view source on GitHub ↗
(inputPath, outputPaths)

Source from the content-addressed store, hash-verified

9import fg from 'fast-glob';
10
11const buildCss = async (inputPath, outputPaths) => {
12 const inputContent = await fs.readFile(inputPath, 'utf-8');
13
14 const result = await postcss([
15 postcssImportExtGlob,
16 postcssImport,
17 tailwindcss,
18 autoprefixer,
19 cssnano
20 ]).process(inputContent, {from: inputPath});
21
22 for (const outputPath of outputPaths) {
23 await fs.mkdir(path.dirname(outputPath), {recursive: true});
24 await fs.writeFile(outputPath, result.css);
25 }
26
27 return result.css;
28};
29
30export const buildAllCss = async () => {
31 const tasks = [];

Callers 1

buildAllCssFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected