build(scripts): replace glob with tinyglobby (#2041)

This commit is contained in:
Eric Liu 2024-11-10 10:07:51 -08:00
commit c7529fe3f8
3 changed files with 11 additions and 9 deletions

View file

@ -1,5 +1,5 @@
const fs = require("node:fs");
const glob = require("glob");
const { globSync }= require("tinyglobby");
const { sveld } = require("sveld");
const pkg = require("../package.json");
@ -21,7 +21,7 @@ sveld({
},
});
glob.sync("./src/**/*.d.ts").forEach((file) => {
globSync(["./src/**/*.d.ts"]).forEach((file) => {
console.log("Copying", file, " to types/");
fs.copyFileSync(file, file.replace(/src/, "types"));
});