# map-tsmaker **Repository Path**: zmwcodediy/map-tsmaker ## Basic Information - **Project Name**: map-tsmaker - **Description**: map-tsmaker - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2022-07-10 - **Last Updated**: 2025-09-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # map-tsmaker - ts作图环境搭建 - lua弱类型语言 - typescript环境搭建 - ts->lua脚本 - [map-tsmaker](https://gitee.com/zmwcodediy/map-tsmaker) # 环境搭建 ## 创建空白地图 - 触发添加作弊码`exec-lua:main` ## 初始化ts环境 1. 执行`env.bat` - 需要安装[nodejs](http://nodejs.cn/download/) 2. `package.json`添加命令 ```json { "scripts": { "build": "tstl", "dev": "tstl --watch", "war3": "runmap" }, } ``` 3. `tsconfig.json`配置 ```json { "compilerOptions": { "target": "esnext", "lib": [ "esnext" ], "moduleResolution": "node", "types": [ "lua-types/5.3", ], "strict": true }, "tstl": { "luaTarget": "5.3", "noImplicitSelf": true, "noHeader": true, "noResolvePaths": [ "jass.common", "jass.ai", "jass.globals", "jass.japi", "jass.hook", "jass.runtime", "jass.slk", "jass.console", "jass.debug", "jass.log", "jass.runtime", "jass.message", "jass.bignum", ], // 是否打包为单个lua文件 "luaBundle": "map/map/main.lua", "luaBundleEntry": "src/index.ts" } } ``` ## 打印测试 ```ts // src/index.ts const ydConsole = require("jass.console") _G["print"] = ydConsole.write; print("hello ts") ``` - 运行`build`生成lua脚本 - 启动地图