magic-script-components-react-native icon indicating copy to clipboard operation
magic-script-components-react-native copied to clipboard

Resolve iOS and Android platform dependencies

Open kpiascik opened this issue 6 years ago • 1 comments

Change our post install scripts which currently clone iOS and Android platforms and make them npm dependencies instead.

We will need to then copy the iOS and Andorid folders to the correct location of the final project when we create a new one which uses iOS and/or Android

kpiascik avatar Sep 11 '19 14:09 kpiascik

Hey, just to sum up my investigation today:

When we do "git clone $REPO", we are creating structure expected by the React Native. With npm dependencies, we will have to copy those repositories (android/iOS) to main directory of this library.

Assuming we want to have only the platform-specific code chosen by the developer and still use npm dependencies, should we create something like this:

  1. Add components-android & components-ios as npm dependency in this library
  2. During project initialization, we should copy the "components-platform" to the directory expected by React Native
  3. If only one platform is chosen, delete the second platform (either iOS or Android)

panwrona avatar Sep 12 '19 13:09 panwrona