packages/cli/readme.md
A CLI for Mitosis.
npm install -g @builder.io/mitosis-cli
mitosis compile --to=<format> < <input-file>
cat my-file.tsx | mitosis compile -t=<format>
mitosis compile -t=<format> <input-file>
Check the output from mitosis compile --help.
Examples
mitosis compile -t react component.tsx
mitosis compile -t react < component.tsx
cat component.tsx | mitosis compile -t html -
mitosis compile -t react --out-dir build -- src/**/*.tsx
Supported formats for --to are:
reactNativesolidvuereacttemplatehtmlcustomElementmitosisbuilderswiftsvelteliquidangularSupported formats for --from are:
mitosisbuilderliquidHere are some recipes for standard tasks
cat components/postscript.lite.tsx |
mitosis compile -t builder - |
mitosis compile -f builder -t mitosis
find . -name '*lite.tsx' | entr make /_
mitosis from the root of this repository breaks due to some
dynamic babel configuration look up--out-dir=<dir> maintain the original
file extension of the input file, which doesn't make any sense in the case of
an html output.--out=<file> does not support concatenating multiple files together.