mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
10 lines
328 B
TypeScript
Executable File
10 lines
328 B
TypeScript
Executable File
// @ts-ignore
|
|
import fs from 'fs';
|
|
import { URL, fileURLToPath } from 'url';
|
|
|
|
const packagePath = fileURLToPath(new URL('../package.json', import.meta.url));
|
|
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf-8'));
|
|
export const cliVersion: string = packageJson.version;
|
|
|
|
process.env.VANT_CLI_VERSION = cliVersion;
|