bamlab / react-native-make

A collection of everyday React Native CLI tools
MIT License
762 stars 89 forks source link

[Feature] Support Monorepo ? #12

Closed fortezhuo closed 4 years ago

fortezhuo commented 5 years ago

How to use this CLI while we use RN monorepo package like : https://github.com/brunolemos/react-native-web-monorepo/ ?

yleflour commented 5 years ago

Hello, have you tried installing, and running it from the packages/mobile folder?

fortezhuo commented 5 years ago

Yes. I have tried, but while I install from package/mobile, the module will be installed on root of project, and while I run react-native -h, the new commands (set-icon / set-splash) don't exist

yleflour commented 5 years ago

Unfortunately I haven't been able to reproduce this issue.

It seems to be a problem with your environment setup and/or package manager. There is nothing I do at install time to force hoist to the parent package.

Can you:

firdausious commented 4 years ago

@fortezhuo @yleflour perhaps you need to specify nohoist options in your root package.json

{
   "workspaces":{
      "packages":[
         "packages/*"
      ],
      "nohoist":[
         "**/@bam.tech/react-native-make",
         "**/@bam.tech/react-native-make/**",
         "**/react-native",
         "**/react-native/**"
      ]
   }
}
fortezhuo commented 4 years ago

sorry for late response.. @firdausious provides great solution.