mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-04-03 16:21:04 +00:00
15 lines
295 B
JavaScript
15 lines
295 B
JavaScript
|
import { readFile, writeFile } from 'fs/promises'
|
||
|
|
||
|
const pkg = JSON.parse(
|
||
|
await readFile(
|
||
|
new URL('../package.json', import.meta.url)
|
||
|
)
|
||
|
)
|
||
|
|
||
|
await writeFile(
|
||
|
new URL('../src/version.ts', import.meta.url),
|
||
|
`export const version = '${pkg.version}'
|
||
|
export const name = '${pkg.name}'
|
||
|
`
|
||
|
)
|