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");
const glob = require("glob");
const { sveld } = require("sveld");
const pkg = require("../package.json");
import fs from "node:fs";
import glob from "glob";
import { sveld } from "sveld";
import pkg from "../package.json" assert { type: "json" };
sveld({
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/");
fs.copyFileSync(file, file.replace(/src/, "types"));
});