feat(dev): 添加开发服务器与热重载支持

- 新增 `npm run dev` 命令,启动带热重载的开发服务器
- 集成 rollup watch 模式与 LiveReload 实现自动刷新
- 添加开发指南 DEVELOPMENT.md,说明项目结构、预览方式及构建流程
- 新增开发预览页面 index.html,用于嵌入展示 sidepanel 内容
- 更新 package.json 和 package-lock.json,引入相关开发依赖
```
This commit is contained in:
雨霖铃
2025-11-18 00:26:41 +08:00
parent 8b608341e7
commit bc1943dc16
10 changed files with 918 additions and 30 deletions
+7 -1
View File
@@ -12,7 +12,9 @@ import {
handleConvertTimestamp,
handleConvertDateToTimestamp,
handleCopyTimestamp,
handleClosePanel
handleClosePanel,
handleTimezoneResult,
handleTimezoneInput
} from './modules/eventHandlers.js';
import { addEventListenerById } from './utils/domUtils.js';
@@ -43,3 +45,7 @@ addEventListenerById('convert-date-to-timestamp-btn', 'click', handleConvertDate
addEventListenerById('copy-timestamp-btn', 'click', handleCopyTimestamp);
// 绑定关闭面板按钮事件
addEventListenerById('close-panel-btn', 'click', handleClosePanel);
// 绑定切换时区事件
addEventListenerById('timezone-result', 'change', handleTimezoneResult)
// 绑定输入时区事件
addEventListenerById('timezone-input', 'change', handleTimezoneInput)