Skip to content

Commit 26c0e95

Browse files
committed
Add git monorepo usage trick
1 parent 5277a0f commit 26c0e95

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,17 @@ If you use this bindings from the git repo, be sure to use
2424
"bs-react-native/bs-react-native",
2525
// ReactNative, WIP on zero-cost bindings (require bs-platform 5.0.0 & and reason-react hooks branch)
2626
"bs-react-native/bs-react-native-next"
27+
},
28+
"js-post-build": {
29+
"cmd": "./node_modules/bs-react-native/git-monorepo-usage-trick"
2730
}
2831
}
2932
```
3033

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

33-
_Next ReactNative zero-cost bindings are still WIP, so use carefully at your own risk._
36+
_Next ReactNative zero-cost bindings are still WIP, so use carefully at your own
37+
risk._
3438

3539
## Getting Started
3640

‎bs-react-native-next/bsconfig.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "bs-react-native",
2+
"name": "bs-react-native-next",
33
"namespace": "react-native",
44
"refmt": 3,
55
"reason": { "react-jsx": 2 },

‎git-monorepo-usage-trick‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
# Trick to convert require("bs-react-native*
4+
# to require("bs-react-native/bs-react-native*
5+
# only necessary when you are using git repo as a dep
6+
7+
sed -i '' -e 's/require("bs-react-native\//require("bs-react-native\/bs-react-native\//g' $1

0 commit comments

Comments
 (0)