Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/zh/refactor shim #142

Merged
merged 15 commits into from
Aug 13, 2019
24 changes: 20 additions & 4 deletions .babelrc
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"presets": ["module:metro-react-native-babel-preset"],
"plugins": [
[
"@babel/plugin-transform-flow-strip-types"
],
["@babel/plugin-transform-flow-strip-types"],
[
"@babel/plugin-proposal-decorators",
{
Expand All @@ -13,7 +11,7 @@
[
"@babel/plugin-proposal-class-properties",
{
"loose":true
"loose": true
}
],
[
Expand All @@ -22,6 +20,24 @@
"helpers": true,
"regenerator": false
}
],
[
"rewrite-require",
{
"aliases": {
"crypto": "react-native-crypto",
"stream": "readable-stream",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"_stream_readable": "readable-stream/readable",
"_stream_transform": "readable-stream/transform",
"_stream_writable": "readable-stream/writable",
"@polkadot/wasm-crypto": "@plugnet/wasm-crypto-js",
"@plugnet/util": "@polkadot/util",
"vm": "vm-browserify"
},
"throwForNonStringLiteral": true
}
]
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ buck-out/
*/fastlane/screenshots

# Bundle artifact
release_ios/
*.jsbundle
6 changes: 2 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ import com.android.build.OutputFile
*/

project.ext.react = [
entryFile: "index.js"
entryFile: "index.js",
odeExecutableAndArgs: ["node", "--max_old_space_size=4096"]
]

apply from: "../../node_modules/react-native/react.gradle"
Expand Down Expand Up @@ -165,10 +166,7 @@ dependencies {
implementation project(':react-native-qr-scanner')
implementation project(':react-native-i18n')
compile project(':react-native-update')
compile project(':react-native-udp')
compile project(':react-native-tcp')
compile project(':react-native-secure-storage')
compile project(':react-native-os')
compile project(':react-native-camera')
compile project(':react-native-randombytes')
compile project(':react-native-sensitive-info')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
import com.lewin.qrcode.QRScanReaderPackage;
import com.AlexanderZaytsev.RNI18n.RNI18nPackage;
import cn.reactnative.modules.update.UpdatePackage;
import com.tradle.react.UdpSocketsModule;
import com.peel.react.TcpSocketsModule;
import li.yunqi.rnsecurestorage.RNSecureStoragePackage;
import com.peel.react.rnos.RNOSModule;
import org.reactnative.camera.RNCameraPackage;
import com.bitgo.randombytes.RandomBytesPackage;
import br.com.classapp.RNSensitiveInfo.RNSensitiveInfoPackage;
Expand Down Expand Up @@ -51,10 +48,7 @@ protected List<ReactPackage> getPackages() {
new QRScanReaderPackage(),
new RNI18nPackage(),
new UpdatePackage(),
new UdpSocketsModule(),
new TcpSocketsModule(),
new RNSecureStoragePackage(),
new RNOSModule(),
new RNCameraPackage(),
new RandomBytesPackage(),
new RNSensitiveInfoPackage(),
Expand Down
10 changes: 2 additions & 8 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@ include ':react-native-i18n'
project(':react-native-i18n').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-i18n/android')
include ':react-native-update'
project(':react-native-update').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-update/android')
include ':react-native-udp'
project(':react-native-udp').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-udp/android')
include ':react-native-tcp'
project(':react-native-tcp').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-tcp/android')
include ':react-native-secure-storage'
project(':react-native-secure-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-secure-storage/android')
include ':react-native-os'
project(':react-native-os').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-os/android')
include ':react-native-camera'
project(':react-native-secure-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-secure-storage/android'
include ':react-native-camera
project(':react-native-camera').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-camera/android')
include ':react-native-randombytes'
project(':react-native-randombytes').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-randombytes/android')
Expand Down
1 change: 0 additions & 1 deletion babel.config.js

This file was deleted.

1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @Date: 2019-06-18 21:08:00
*/
/** @format */
import './shim'
import 'node-libs-react-native/globals'
import { AppRegistry } from 'react-native'
import Api from '@polkadot/api/promise'
Expand Down
Loading