From 0d1ff59401c717fc2226f526a691848d5337ac79 Mon Sep 17 00:00:00 2001 From: Enrico Sacchetti Date: Mon, 23 Jan 2023 10:24:37 -0500 Subject: [PATCH] chore: convert build-docs script to esm --- scripts/build-docs.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/build-docs.js b/scripts/build-docs.js index 92efe913ba..be7028672d 100644 --- a/scripts/build-docs.js +++ b/scripts/build-docs.js @@ -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")); });