30 releases (7 stable)
new 1.2.0 | Nov 16, 2024 |
---|---|
1.1.3 | Jun 6, 2024 |
1.1.2 | Aug 21, 2023 |
1.1.1 | Jun 21, 2023 |
0.2.13 | Nov 24, 2021 |
#285 in Development tools
110KB
3K
SLoC
Moonwave
Moonwave is a command line tool for generating documentation from comments in Lua source code.
This repository contains three projects:
- The Moonwave Extractor, a Rust program that parses Lua files and extracts the docs as JSON
- A plugin for Docusaurus, written in React, which displays the JSON docs visually
- The Moonwave CLI, which allows you to use both the extractor and the Docusaurus plugin without needing to know anything about how they work.
Key features
- Easy to use: You can generate a website with little-to-no configuration and just a few comments in your Lua code.
- Extensive validation system which can catch mistakes when something doesn't make sense.
- Generates JSON from your doc comments, which can be consumed by many different tools.
- Simple doc comment format that is easy to read directly when editing your code.
Demo
Check out the roblox-lua-promise docs. This website is completely generated by Moonwave!
Name
Lua is the moon. The moon is your code. The moon influences the waves in the ocean, just like your code influences its documentation. So.. moonwave!
Docs
Check out the Documentation website
Building in Development and Contributing
Requirements:
- Clone this repository
- in
cli
, runnpm i
,npm run tsc
, andnpm link
- in
docusaurus-plugin-moonwave
, runnpm i
- in
extractor
, runcargo install --path . --locked
- in
cli
, runnpm run dev
- in another terminal, navigate to the project you want to test with, and run
MOONWAVE_DEV=1 moonwave dev
You should now be able to change files in the moonwave
folder and things should live-reload on your development website. If they don't, Ctrl+C the moonwave dev
terminal and restart it. If you continue to have issues, try adding the -i
flag to reinstall all dependencies.
License
Moonwave is available under the terms of the Mozilla Public License Version 2.0. Terms and conditions are available in LICENSE.txt or at https://www.mozilla.org/en-US/MPL/2.0/.
Dependencies
~5–13MB
~140K SLoC