gkd-subscription/scripts/showVersion.ts

7 lines
214 B
TypeScript
Raw Normal View History

2023-11-05 19:08:52 +08:00
import fs from 'node:fs/promises';
import type PkgT from '../package.json';
const pkg: typeof PkgT = JSON.parse(
await fs.readFile(process.cwd() + '/package.json', 'utf-8'),
);
process.stdout.write(pkg.version);