chore: replace eslint & prettier w/ biomejs (#21)
* chore: replace eslint & prettier w/ biomejs * fix syntax error in ci.yml workflow * ensure that build CI jobs only run if check job succeeds to save resources
This commit is contained in:
parent
d67e4c81ad
commit
e319626a1a
44 changed files with 2408 additions and 5691 deletions
|
|
@ -1,26 +1,25 @@
|
|||
import { promises as fs } from "fs";
|
||||
import * as path from "path";
|
||||
import { Config } from "websnacks";
|
||||
import { promises as fs } from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import type { Config } from "websnacks";
|
||||
|
||||
import { stylesheetPath } from "./config";
|
||||
|
||||
const config: Config = {
|
||||
// Watch additional files and folders for changes when the dev server is
|
||||
// running.
|
||||
watch: ["components/", "config.ts"],
|
||||
// Hooks to execute after certain rendering events. Currently only
|
||||
// afterSiteRender is supported.
|
||||
hooks: {
|
||||
async afterSiteRender({ outDir }): Promise<void> {
|
||||
// NOTE: we dynamically import typestyle so that the global style
|
||||
// registry is properly updated once all pages are reloaded in
|
||||
// dev. We could also create a typestyle object in config.ts,
|
||||
// or even multiple objects to split up our styles into e.g. a
|
||||
// critical-path.css and noncrticial.css.
|
||||
const { getStyles } = await import("typestyle");
|
||||
const styles = getStyles();
|
||||
await fs.writeFile(path.join(outDir, stylesheetPath), styles);
|
||||
},
|
||||
},
|
||||
// Watch additional files and folders for changes when the dev server is
|
||||
// running.
|
||||
watch: ["components/", "config.ts"],
|
||||
// Hooks to execute after certain rendering events. Currently only
|
||||
// afterSiteRender is supported.
|
||||
hooks: {
|
||||
async afterSiteRender({ outDir }): Promise<void> {
|
||||
// NOTE: we dynamically import typestyle so that the global style
|
||||
// registry is properly updated once all pages are reloaded in
|
||||
// dev. We could also create a typestyle object in config.ts,
|
||||
// or even multiple objects to split up our styles into e.g. a
|
||||
// critical-path.css and noncrticial.css.
|
||||
const { getStyles } = await import("typestyle");
|
||||
const styles = getStyles();
|
||||
await fs.writeFile(path.join(outDir, stylesheetPath), styles);
|
||||
},
|
||||
},
|
||||
};
|
||||
export = config;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue