Skip to content

Commit

Permalink
fix: avoid flaky builds, ensure output dir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Feb 14, 2025
1 parent c4b943b commit 761c6f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/build-utils-css/src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ const buildStyles = async (config) => {
};

const buildTokens = async ({ inputFile, outputFile }) => {
// Ensure output directory exists
const outputDir = path.dirname(outputFile);
await mkdir(outputDir, { recursive: true });

const json = JSON.parse(await readFile(inputFile, 'utf-8'));

await writeFile(outputFile, `export default ${JSON.stringify(json, null, 2)};\n`);
Expand Down

0 comments on commit 761c6f9

Please sign in to comment.