Files
ogame-vue-ts/update-build-date.js
谦君 752cade67c refactor: 优化主界面布局与通知系统
重构App.vue,首页独立无侧边栏,其他页面采用统一侧边栏布局。新增右下角固定通知区,集成返回顶部、队列通知、外交通知和敌方警报。移除新手引导组件,替换为弱引导提示系统。支持星球重命名弹窗。优化NPC成长与行为定时器逻辑,提升性能和可维护性。删除issue模板及相关文档描述。
2025-12-19 12:01:45 +08:00

20 lines
692 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')
} catch (error) {
console.error('Failed to update build date:', error)
process.exit(1)
}