now using some explicit req
This commit is contained in:
parent
d32aa03e66
commit
e33f0bcf81
3
index.js
3
index.js
|
@ -5,7 +5,8 @@ if (typeof Buffer === 'undefined') {
|
|||
var sjcl = require('sjcl');
|
||||
var sjclRandom = new sjcl.prng(10);
|
||||
|
||||
var RNRandomBytes = require('react-native').NativeModules.RNRandomBytes;
|
||||
var explicitReq = require;
|
||||
var RNRandomBytes = explicitReq('react-native').NativeModules.RNRandomBytes;
|
||||
|
||||
module.exports.randomBytes = function(length, cb) {
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"babelify": "mkdir -p browser && ./node_modules/.bin/browserify --exclude react-native -t [ babelify --presets [ react es2015 ] ] ./index.js | sed -e 's/require/bitgoReq/g' > ./browser/react_index.js"
|
||||
"babelify": "mkdir -p browser && ./node_modules/.bin/browserify --exclude react-native -t [ babelify --presets [ react es2015 ] ] ./index.js | sed -e 's/require/bitgoReq/g' | sed -e 's/explicitReq = bitgoReq/explicitReq = require/g' > ./browser/react_index.js"
|
||||
},
|
||||
"keywords": [
|
||||
"react-component",
|
||||
|
|
Loading…
Reference in New Issue