First generation
This page covers: without changing tables, run generation once with MiniTemplate to confirm the environment is correct.
Steps
- Open
luban_examples/MiniTemplate. - Run:
- Windows:
gen.bat - macOS / Linux:
gen.sh
- Windows:
- Success when the terminal ends with something like
bye~. - Check whether the script’s output directory (often
output/) contains generated data files.
What the script does (conceptually)
A successful generation at least includes:
| Flag | Meaning |
|---|---|
--conf luban.conf | Project config |
-t <target> | Export target, e.g. client / server / all |
-d <dataTarget> | Data format, e.g. json / bin |
-x outputDataDir=... | Data output directory |
If code is generated as well, you also need -c <codeTarget> and outputCodeDir.
Full flags: Common CLI and CLI reference.
Common pitfalls
- Output directory is wiped: Luban cleans
outputCodeDir/outputDataDirby default—do not point them at existing business source trees (e.g. the wholeAssets/Scripts). - Multiple
-c/-dpointing at the same directory will overwrite each other; use cascading options to separate directories—see CLI.
Related links
- Previous: Install
- Next: Add a table and export