Skip to content

Commit 3bb69ec

Browse files
authored
📝 Adds js files as bridge to run .rb files (#48)
1 parent bdd6def commit 3bb69ec

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

link_bridge.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const exec = require('child_process').exec;
2+
exec("ruby ./node_modules/instabug-reactnative/link.rb || echo \"Ruby doesn't exist, if you're building this for Android only, then feel free to ignore this error, otherwise please install Ruby and run 'react-native link instabug-reactnative' again\"");

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"homepage": "https://github.com/Instabug/instabug-reactnative#readme",
2525
"rnpm": {
2626
"commands": {
27-
"postlink": "ruby ./node_modules/instabug-reactnative/link.rb || echo \"Ruby doesn't exist, if you're building this for Android only, then feel free to ignore this error, otherwise please install Ruby and run 'react-native link instabug-reactnative' again\"",
28-
"preunlink": "ruby ./node_modules/instabug-reactnative/unlink.rb || echo \"Ruby doesn't exist, if you're building this for Android only, then feel free to ignore this error, otherwise please install Ruby and run 'react-native link instabug-reactnative' again\""
27+
"postlink": "node node_modules/instabug-reactnative/link_bridge.js",
28+
"preunlink": "node node_modules/instabug-reactnative/unlink_bridge.js"
2929
},
3030
"android": {
3131
"packageInstance": "\t\tnew RNInstabugReactnativePackage.Builder(\"YOUR_ANDROID_APPLICATION_TOKEN\",MainApplication.this)\n\t\t\t\t\t\t\t.setInvocationEvent(\"shake\")\n\t\t\t\t\t\t\t.setPrimaryColor(\"#1D82DC\")\n\t\t\t\t\t\t\t.setFloatingEdge(\"left\")\n\t\t\t\t\t\t\t.setFloatingButtonOffsetFromTop(250)\n\t\t\t\t\t\t\t.build()"

unlink_bridge.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const exec = require('child_process').exec;
2+
exec("ruby ./node_modules/instabug-reactnative/unlink.rb || echo \"Ruby doesn't exist, if you're building this for Android only, then feel free to ignore this error, otherwise please install Ruby and run 'react-native link instabug-reactnative' again\"");

0 commit comments

Comments
 (0)