chore: convert build-docs script to esm

This commit is contained in:
Enrico Sacchetti 2023-01-23 10:24:37 -05:00
commit 1b3e045c24
No known key found for this signature in database
GPG key ID: 3374B89ECA60D796

View file

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