Ful佬说的对

This commit is contained in:
lutinglt
2025-02-17 22:22:28 +08:00
parent 5bba897e11
commit 49812f0ee0
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
dist
node_modules node_modules
deno.lock deno.lock

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno run -A --allow-scripts #!/usr/bin/env -S deno run -A --allow-scripts -q
import * as sass from "npm:sass"; import * as sass from "npm:sass";
import * as yaml from "npm:js-yaml"; import * as yaml from "npm:js-yaml";
@@ -25,6 +25,7 @@ async function buildTheme(themePath: string) {
const outputFile = "dist/theme-github.css"; const outputFile = "dist/theme-github.css";
const result = await sass.compileAsync(inputFile, { sourceMap: false, style: "compressed" }); const result = await sass.compileAsync(inputFile, { sourceMap: false, style: "compressed" });
await Deno.mkdir("dist", { recursive: true });
await Deno.writeTextFile(outputFile, result.css); await Deno.writeTextFile(outputFile, result.css);
const fileContent = await Deno.readTextFile(themePath); const fileContent = await Deno.readTextFile(themePath);