Greenstand / treetracker-web-map-core-demo

5 stars 7 forks source link

The monorepo for native and web demo.

How to start

On the root folder:

yarn
cd apps/web
yarn dev
cd apps/native
yarn start

About the structure

Development Rules for this project

About the hoisting

All the packages are hoisted to the root folder, which means the package will be installed in the root's node_modules rather the one under apps, the reason is that for some package, like react we can not separate (nohoist) it into both web and demo-core, if doing so, the app will throw error about react hook problem.

If there are some packages that we can separate/nohoist in the folder, for example, native, we can add the package into the root's package.json:

{
  "workspaces": {
    "packages": [
      "apps/*",
      "packages/*"
    ],
    "nohoist": [
      "**/react-native",
      "**/react-native/**"
    ]
  }
}