-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99aa73a
commit 24e0a24
Showing
8 changed files
with
114 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env -S deno run --allow-read --allow-write | ||
import { walk } from "jsr:@std/fs/walk"; | ||
|
||
import init, { format } from "../pkg/biome_fmt.js"; | ||
|
||
await init(); | ||
|
||
const test_root = new URL(import.meta.resolve("../test_data")); | ||
|
||
for await (const entry of walk(test_root, { | ||
includeDirs: false, | ||
exts: ["html", "vue", "json", "tsx"], | ||
})) { | ||
if (entry.name.startsWith(".")) { | ||
continue; | ||
} | ||
|
||
const expect_path = entry.path + ".snap"; | ||
const input = Deno.readTextFileSync(entry.path); | ||
|
||
const actual = format(input, entry.path); | ||
Deno.writeTextFileSync(expect_path, actual); | ||
} | ||
console.log("done"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env -S deno run --allow-read --allow-write | ||
import { walk } from "jsr:@std/fs/walk"; | ||
|
||
import init, { format } from "../pkg/web_fmt.js"; | ||
|
||
await init(); | ||
|
||
const test_root = new URL(import.meta.resolve("../test_data")); | ||
|
||
for await (const entry of walk(test_root, { | ||
includeDirs: false, | ||
exts: ["html", "vue", "json", "tsx"], | ||
})) { | ||
if (entry.name.startsWith(".")) { | ||
continue; | ||
} | ||
|
||
const expect_path = entry.path + ".snap"; | ||
const input = Deno.readTextFileSync(entry.path); | ||
|
||
const actual = format(input, entry.path); | ||
Deno.writeTextFileSync(expect_path, actual); | ||
} | ||
console.log("done"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters