2020-10-14 23:48:52 +00:00
|
|
|
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;
|
|
|
|
|
2020-10-17 23:12:40 +00:00
|
|
|
await wjson("meta.json", meta);
|
2020-10-14 23:48:52 +00:00
|
|
|
|
2020-10-19 19:14:21 +00:00
|
|
|
await Deno.copyFile("readme.md", "esm/readme.md");
|
2020-10-14 23:48:52 +00:00
|
|
|
await Deno.copyFile("esm/index.js", "esm/mod.js");
|
|
|
|
await Deno.copyFile("esm/index.d.ts", "esm/mod.d.ts");
|