now using some explicit req

This commit is contained in:
Arik Sosman 2016-01-12 13:35:12 -08:00
parent d32aa03e66
commit e33f0bcf81
2 changed files with 3 additions and 2 deletions

View File

@ -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) {

View File

@ -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",