项目作者: agrcrobles

项目描述 :
babel preset for react native, web3 and babel 6
高级语言: JavaScript
项目地址: git://github.com/agrcrobles/babel-preset-react-native-web3.git
创建时间: 2018-01-16T20:37:01Z
项目社区:https://github.com/agrcrobles/babel-preset-react-native-web3

开源协议:MIT License

下载


babel-preset-react-native-web3

It is experimental but looks like it’s working on web3 version 0.x

This makes crypto work on JavascriptCore using crypto-browserify and a pure javascript tiny implementation of randombytes.

Can be considered as a workaround, buffer and process global variable.

Overview

Getting started

  1. # Install dependencies
  2. yarn add --dev babel-preset-react-native-web3
  3. yarn add web3@^0.20.2
  1. Add the following in your .babelrc
  1. {
  2. "presets": [
  3. // "babel-preset-react-native" or "babel-preset-expo",
  4. "babel-preset-react-native-web3"
  5. ]
  6. }
  1. Import globals in your App.js as described below:

App.js

  1. import 'babel-preset-react-native-web3/globals';

See sample

License

MIT @ zetta