Files
ogame-vue-ts/update-build-date.js
谦君 731d79673b feat: 新增战报弹窗与舰队模拟器,重构UI组件
新增 BattleReportDialog、SpyReportDialog、NumberWithTooltip 等组件,完善舰队模拟器功能。重构并引入 Sheet、Sidebar、Tooltip、Skeleton 等 UI 组件,优化界面结构。实现 battle.worker 支持战斗计算,增加 universeStore、fleetStorageLogic 等核心逻辑,完善多语言与类型定义。
2025-12-13 11:14:23 +08:00

24 lines
761 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { readFileSync, writeFileSync } from 'fs'
import { fileURLToPath } from 'url'
import { dirname, join } from 'path'
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
const packageJsonPath = join(__dirname, 'package.json')
try {
// 读取 package.json
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'))
// 更新构建日期
packageJson.buildDate = new Date().toLocaleString()
// 写回 package.json (保持格式化缩进2个空格)
writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n', 'utf-8')
console.log(`✓ Build date updated: ${packageJson.buildDate}`)
} catch (error) {
console.error('Failed to update build date:', error)
process.exit(1)
}