Skip to content

Files

This branch is 405 commits behind BuilderIO/mitosis:main.

basic

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 10, 2022
Sep 9, 2022
Jun 8, 2022
Jun 8, 2022
Dec 2, 2022
Mar 10, 2022
Mar 10, 2022
Apr 19, 2022
Mar 10, 2022
Mar 31, 2023
Jul 11, 2022

Example Mitosis project

Setup

# install
yarn install

# build
yarn run build

# run dev server that watches for changes
yarn run start

# test
yarn run test

Project structure

Here are some key things to look at:

  • src contains your Mitosis source code
  • output contains per-target output of the project
    • You will notice .lite.tsx files in your output. Those are a human-readable Mitosis components. Think of them as a reference point for you to debug more easily, since the actual JS output is minified and thus difficult to read.
  • mitosis.config.js contains general and per-target configuration. It is used by mitosis build.
  • overrides contains a per-target folder that mimicks the structure of src, and will completely swap out any files with identical names. Example: since we have defined overrides/react-native/src/functions/is-react-native.ts, it will override src/functions/is-react-native.ts in output/react-native/src/functions/is-react-native.js