Generates Luau definition files from Chrome Devtools Protocol JSON definitions.
You can see the output of /json in /protocol as an example.
You can install lune-generate-cdp
simply by dragging build-definitions.luau into your project. From there, you can tweak constants to your liking.
lune-generate-cdp
is a Lune script which means you'll need the Lune runtime to execute it.
> lune run build-definitions
Warning: The formatting of Luau files relies on stylua being on the system PATH. You can toggle formatting by tweaking the SHOULD_FORMAT
constant.
lune-generate-cdp
can/cannot:
- ✅ generate definitions for commands
- ✅ generate definitions for events
- ✅ generate general type definitions
- ❌ generate type definitions for commands
- ❌ generate type definitions for events