添加版本脚本

This commit is contained in:
lutinglt
2025-06-24 20:48:27 +08:00
parent 711e01b66c
commit f65338b227
3 changed files with 11 additions and 5 deletions

8
scripts/version.cjs Normal file
View File

@@ -0,0 +1,8 @@
const fs = require('fs');
const path = require('path');
const pkgPath = path.join(__dirname, '..', 'package.json');
const pkg = JSON.parse(fs.readFileSync(pkgPath));
const version = pkg.version;
console.log(version);