Skip to content

Commit

Permalink
chore(scripts): don't format internal metadata used in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Jul 30, 2024
1 parent 8ff1b84 commit 8ce38a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion scripts/build-languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export { ${moduleName} as default } from "./";\n`,
await writeTo("src/languages/index.js", base);
await writeTo("src/languages/index.d.ts", baseTs);
await writeTo("SUPPORTED_LANGUAGES.md", markdown);
await writeTo("www/data/languages.json", lang);

// Don't format metadata used in docs.
await Bun.write("www/data/languages.json", JSON.stringify(lang));
console.timeEnd("build languages");
}
7 changes: 5 additions & 2 deletions scripts/build-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,13 @@ export async function buildStyles() {
await writeTo("src/styles/index.js", base);
await writeTo("src/styles/index.d.ts", types);
await writeTo("SUPPORTED_STYLES.md", markdown);
await writeTo("www/data/styles.json", styles);
await writeTo(

// Don't format metadata used in docs.
await Bun.write("www/data/styles.json", JSON.stringify(styles));
await Bun.write(
"www/data/scoped-styles.css",
minifyCss(scoped_styles, { removeAll: true }),
);

console.timeEnd("build styles");
}

0 comments on commit 8ce38a4

Please sign in to comment.