Skip to content

Commit

Permalink
Add git monorepo usage trick
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Mar 21, 2019
1 parent 5277a0f commit 26c0e95
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ If you use this bindings from the git repo, be sure to use
"bs-react-native/bs-react-native",
// ReactNative, WIP on zero-cost bindings (require bs-platform 5.0.0 & and reason-react hooks branch)
"bs-react-native/bs-react-native-next"
},
"js-post-build": {
"cmd": "./node_modules/bs-react-native/git-monorepo-usage-trick"
}
}
```

Did you notice that this way, you can use both bindings to slowly migrate?

_Next ReactNative zero-cost bindings are still WIP, so use carefully at your own risk._
_Next ReactNative zero-cost bindings are still WIP, so use carefully at your own
risk._

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion bs-react-native-next/bsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "bs-react-native",
"name": "bs-react-native-next",
"namespace": "react-native",
"refmt": 3,
"reason": { "react-jsx": 2 },
Expand Down
7 changes: 7 additions & 0 deletions git-monorepo-usage-trick
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

# Trick to convert require("bs-react-native*
# to require("bs-react-native/bs-react-native*
# only necessary when you are using git repo as a dep

sed -i '' -e 's/require("bs-react-native\//require("bs-react-native\/bs-react-native\//g' $1

0 comments on commit 26c0e95

Please sign in to comment.