ghost-extension-wallet/scripts/generateManifest.js
Uncle Fatso 6906ca83b7
initial commit in remote repository
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2025-07-22 13:53:22 +03:00

22 lines
514 B
JavaScript

import fs from "node:fs/promises"
import path from "node:path"
import url from "node:url"
const [src, dst] = process.argv.slice(2)
const manifest = JSON.parse(await fs.readFile(src, { encoding: "utf-8" }))
const pkg = JSON.parse(
await fs.readFile(
path.resolve(
path.dirname(url.fileURLToPath(import.meta.url)),
"../package.json",
),
),
)
manifest.version = pkg.version
await fs.writeFile(dst, JSON.stringify(manifest, undefined, 2), {
encoding: "utf8",
})