feat(前端): TypeScript 重写版(esbuild IIFE 产物,暂不接管线上)
- 新增 src-ts/(22 个 .ts / 7792 行):按 core / map / card / order / nav / share / subscribe / ui / compat 分层,types 里有 BMapGL 与 API 响应声明 - compat/globals.ts 是唯一挂 window 的地方(292 个),覆盖模板 139 处内联事件 - esbuild 产出 static/dist/app.js(226.6 KiB,IIFE,es2019)+ README(构建/切换/回滚) - 构建可复现:node esbuild.config.mjs、node --check、npx tsc --noEmit 均通过 - .gitignore 增加 node_modules/ 与 static/dist/*.map(sourcemap 可重生成,不入库) - 暂不改 templates/map.html 与 MAP_ASSETS:等独立核对通过再切换,回滚=换回四个 script
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "xbniu-map-ts",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"description": "TypeScript + esbuild rebuild of static/js/map.js (plus navigation/share/subscribe) as a single IIFE bundle at static/dist/app.js",
|
||||
"scripts": {
|
||||
"build": "node esbuild.config.mjs",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"verify:globals": "node src-ts/tools/verify-globals.mjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.28.2",
|
||||
"typescript": "^7.0.2"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user