React / foldkit-react-codegen
CLI
foldkit-react-codegen <file-or-directory>... --out-dir <directory> [--root-dir <directory>] [--watch] [--source-map]- Directories are searched for
.tsfiles, skipping.d.tsand.test.ts. - Each output lands at
<out-dir>/<path relative to root-dir>.tsx. The root dir defaults to the working directory. - A file whose output bytes are unchanged is not rewritten, so watchers and git see no churn.
- Files without views are copied with a header, so relative imports between compiled files resolve inside the out dir. Imports of files you did not compile will not resolve from there.
--watchcompiles, then recompiles after each change under the inputs. It keeps running after diagnostics, leaving the last good output in place, and ignores its own writes when the out dir is inside an input. Deleting a source does not delete its output.--source-mapwrites<output>.tsx.mapbeside each output and appends asourceMappingURLcomment. Each JSX element and prop maps to the builder call it came from, so a stack trace or breakpoint in generated code lands on the Foldkit source.