16 lines
564 B
JavaScript
16 lines
564 B
JavaScript
const rjson = async (file) => JSON.parse(await Deno.readTextFile(file));
|
|
const wjson = (file, data) =>
|
|
Deno.writeTextFile(file, JSON.stringify(data, undefined, 3));
|
|
|
|
const pkg = await rjson("package.json");
|
|
const meta = await rjson("meta.json");
|
|
|
|
console.log("Changing meta.version from", meta.version, "to", pkg.version);
|
|
meta.version = pkg.version || meta.version;
|
|
|
|
// await wjson("meta.json", meta);
|
|
|
|
await Deno.copyFile("esm/index.js", "esm/mod.js");
|
|
await Deno.copyFile("esm/index.d.ts", "esm/mod.d.ts");
|
|
await Deno.copyFile("readme.md", "esm/readme.md");
|