gkd-subscription/scripts/showVersion.ts
2023-11-05 19:09:05 +08:00

7 lines
214 B
TypeScript

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);