This repository contains a collection of TypeScript first libraries for DCS World.
This collection of packages uses Typescript to author the code and TypeScriptToLua to transpile TypeScript code into Lua.
The shared code libraries are published to NPM where they can be installed separately for authoring further projects using the same technique.
Some useful Docs include:
Detailed usage instructions will be added soon.
Every Lua script in this repo (the test:lua suites, the tslua-http-api dev server) runs on a
repo-managed Lua 5.1.5 interpreter rather than whatever Lua the host has installed. It lives in
packages/tslua-lua51: a small Rust CLI on mlua
with vendored PUC Lua 5.1.5 (the version DCS ships) and statically linked LuaSocket.
The only host prerequisites are Node.js and rustup; the Rust toolchain version is pinned
by packages/tslua-lua51/rust-toolchain.toml and installed automatically. Package scripts invoke it as
lua51, which builds the interpreter on first use:
npx lua51 --setup # build it now
npx lua51 script.lua # same arguments as stock `lua`
npx lua51 --preload dcs-doubles.lua tests.lua # install DCS test doubles first
See the package README for details.
See the UPDATING.md file for instructions on updating the definitions.
To check the dependencies across all monorepo packages, run the following command:
ncu
lerna exec -- ncu
To Update them all, run:
ncu -u
lerna exec -- ncu -u
Take note of this list:
Contributions to this project are welcome. If you find an issue or have suggestions for improvements, please open an issue or submit a pull request.
There are various ways to datamine dcs and of course the docs are a great source of information.
Type exports are maintained through the repository's own DCS bridge (npm run dcs:start). See UPDATING.md for setup and troubleshooting.
This project is licensed under the MIT License.
For any inquiries or contributions, please open an issue on this repository.