@byteink/mppjs (英语)
转换 Microsoft 工程 (.mpp由节点、 Bun 或 Deno 向 MSPDI XML 提交文件.
原生二进制, 运行时不需要JVM。 。 。 .
npx @byteink/mppjs project.mpp # → project.xml
npx @byteink/mppjs project.mpp out/result.xml
import { convert } from "@byteink/mppjs";
const { outputPath } = await convert("project.mpp", "out.xml");
为什么
解析的标准工具 .mpp 实值 MPXJ 地图集 (贾瓦语).
@byteink/mppjs mPXJ作为GraalVM-AOT编译的本地二进制,所以你
得到解析器,没有多克,没有JVM,没有 jpype/IKVM, 和 (英语)
没有多秒钟的冷起步.
安装
npm install @byteink/mppjs # or pnpm add / yarn add / bun add
您平台的本地二进制通过一个 optionalDependencies
侧车(@byteink/mppjs-<platform>-<arch>) (中文(简体) ). 支助目标:
| 平台 | 侧车包 |
|---|---|
| 马可斯臂64 | @byteink/mppjs-darwin-arm64 |
| Linux x64 函数 | @byteink/mppjs-linux-x64 |
| Linux arm64 (英语) | @byteink/mppjs-linux-arm64 |
| 视窗 x64 | @byteink/mppjs-win32-x64 |
如果你的平台没有列出, 打开一个问题。 。 。 .
API 密码
import { convert, type ConvertOptions, type ConvertResult } from "@byteink/mppjs";
await convert(input: string, output?: string, options?: ConvertOptions): Promise<ConvertResult>
input——路径.mpp, (中文(简体) ),.mpx,或任何 格式 MPXJ 理解output— MPDI XML 路径; 默认为<input-without-ext>.xmloptions.binaryPath——覆盖捆绑的二进制路径(也可通过MPPJS_BINARY(原始内容存档于2019-09-21) (英语). env varoptions.timeoutMs——在这么多 ms( 默认) 之后杀死产入过程60_000(中文(简体) )
国 际
Usage: mppjs <input> [output.xml]
退出代码 : 0 好,你别这样, 1 转换失败, 2 使用/ IO 错误.
从源头建楼
要求数 自由党 NIK 23.1.x (或GraalVM JDK 21 的分销,包括
native-image和 马文 3.9+。 。 。 .
git clone https://github.com/byteink/mppjs
cd mppjs
npm install
npm run build # jar → native binary → tsc
npm test # via bun, against MPXJ sample files
本地形象建筑需要5-8分钟的现代笔记本电脑.
见 克劳德·姆德 结构细节,包括
反射元数据 .ni-config/ 当MPXJ升级时会重新生成.
许可证
- TypeScript 包装器( 此包) 是 麻省理工学院。 。 。 .
- 月台专用二进制运出
@byteink/mppjs-<platform>侧式车 包含 MPXJ 并且为 LGPL-2.1- 或- 后期每个侧车包包括: lGPL 文本和一个NOTICE指向上游来源.
包装器引用二进制作为子进程; LGPL 义务是 装入侧车包.