1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00
denoland-deno/tools/napi/generate_link_win.js

15 lines
464 B
JavaScript
Raw Normal View History

#!/usr/bin/env -S deno run --unstable --allow-read --allow-write
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
import exports from "../../cli/napi_sym/symbol_exports.json" assert {
type: "json",
};
let def = "LIBRARY\nEXPORTS\n";
for (const symbol of exports.symbols) {
def += ` ${symbol}\n`;
}
const defUrl = new URL("../../cli/exports.def", import.meta.url);
await Deno.writeTextFile(defUrl.pathname, def, { create: true });