https://github.com/notpeter/playdate-docdef
PlayDateSDK - Generate LuaCATS Annotations
https://github.com/notpeter/playdate-docdef
Last synced: about 1 year ago
JSON representation
PlayDateSDK - Generate LuaCATS Annotations
- Host: GitHub
- URL: https://github.com/notpeter/playdate-docdef
- Owner: notpeter
- License: apache-2.0
- Created: 2023-08-03T13:20:07.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T14:17:58.000Z (about 1 year ago)
- Last Synced: 2025-04-01T15:32:48.143Z (about 1 year ago)
- Language: Lua
- Homepage:
- Size: 752 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# playdate-docdef
## What am I looking at?
Unofficial LuaCATS types for the PlayDate API:
* [stub.lua](stub.lua) (api spec & types only)
* [notpeter/playdate-luacats stub.lua](https://github.com/notpeter/playdate-luacats/)
(api sec, types and scraped text Official Function Docs)
This repository contains the Playdate Lua API specification
and tools for generating Lua Comment And Type System (LUACats)
compliant Lua comments for use with the Lua Language Server
([sumneko.lua](https://marketplace.visualstudio.com/items?itemName=sumneko.lua))
in VSCode, NeoVIM, etc.
These tools can optionally integrate the offical
Playdate Docs into the generated output by scraping the API
docs either locally (e.g. `"~/Developer/PlaydateSDK/Inside Playdate.html"`)
or directly from [https://sdk.play.date](https://sdk.play.date)
to generate a [fully annotated stub.lua](https://github.com/notpeter/playdate-luacats/blob/main/library/stub.lua)
## Usage / Contributing
If you have Playdate type annotation changes/addition just edit [Playdate.luars](playdate.luars)
and then run `cargo run > stub.lua` to see the changes reflected.
For the complete set of annotations: `cargo run -- annotate > stub_annotated.lua`
See: [DESIGN.md](DESIGN.md) for more.
I'm happy to accept corrections/additions to my PlaydateSDK API type annotations
or the rats nest of novice rust code.
## License
Copyright (c) 2023 Peter Tripp
This project is licensed under the [Apache License, Version 2.0](LICENSE-APACHE)
or the [MIT license](LICENSE-MIT) at your option.