Configures Reactotron with the project (#177)

This commit is contained in:
Saket Kumar 2018-01-13 01:38:31 +05:30 committed by Guilherme Gazzo
parent 1df96aef91
commit 50ae73aaf3
6 changed files with 348 additions and 2 deletions

20
app/ReactotronConfig.js Normal file
View File

@ -0,0 +1,20 @@
/* eslint-disable */
import Reactotron, { asyncStorage, networking, openInEditor } from 'reactotron-react-native';
import { NativeModules } from 'react-native';
import { reactotronRedux } from 'reactotron-redux';
// uncomment the following lines to test on a device
// let scriptHostname;
// if (__DEV__) {
// const scriptURL = NativeModules.SourceCode.scriptURL;
// scriptHostname = scriptURL.split('://')[1].split(':')[0];
// }
Reactotron.configure(/*{ host: scriptHostname }*/) // controls connection & communication settings
.useReactNative() // add all built-in react native plugins
.use(reactotronRedux())
.use(asyncStorage())
.use(networking())
.use(openInEditor())
.connect();

View File

@ -26,6 +26,13 @@ if (__DEV__) {
);
}
// uncomment the following lines to integrate reactotron with redux
// const store = Reactotron.createStore(
// reducers,
// enhacers(createStore)(reducers),
// );
const store = enhacers(createStore)(reducers);
sagaMiddleware.run(sagas);

View File

@ -5,7 +5,7 @@ import { AppRegistry } from 'react-native';
import './app/push';
import RocketChat from './app/index';
// import './app/ReactotronConfig';
// import { AppRegistry } from 'react-native';
// import Routes from './app/routes';
//

View File

@ -7,5 +7,6 @@ import './app/push';
import RocketChat from './app/index';
// import { AppRegistry } from 'react-native';
// import Routes from './app/routes';
// import './app/ReactotronConfig';
//
AppRegistry.registerComponent('RocketChatRN', () => RocketChat);

317
package-lock.json generated
View File

@ -705,6 +705,12 @@
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz",
"integrity": "sha1-hgbCy/HEJs6MjsABdER/1Jtur8E="
},
"after": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",
"integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=",
"dev": true
},
"ajv": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.3.0.tgz",
@ -947,6 +953,12 @@
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM="
},
"arraybuffer.slice": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz",
"integrity": "sha1-8zshWfBTKj8xB6JywMz70a0peco=",
"dev": true
},
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
@ -2401,6 +2413,12 @@
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
},
"backo2": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
"integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=",
"dev": true
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
@ -2411,6 +2429,12 @@
"resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz",
"integrity": "sha1-eAqZyE59YAJgNhURxId2E78k9rs="
},
"base64-arraybuffer": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz",
"integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=",
"dev": true
},
"base64-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz",
@ -2450,6 +2474,15 @@
"resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz",
"integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak="
},
"better-assert": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz",
"integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=",
"dev": true,
"requires": {
"callsite": "1.0.0"
}
},
"big-integer": {
"version": "1.6.25",
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.25.tgz",
@ -2509,6 +2542,12 @@
}
}
},
"blob": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz",
"integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=",
"dev": true
},
"block-stream": {
"version": "0.0.9",
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
@ -2834,6 +2873,12 @@
"callsites": "0.2.0"
}
},
"callsite": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
"integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=",
"dev": true
},
"callsites": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz",
@ -3514,11 +3559,23 @@
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
},
"component-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
"integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=",
"dev": true
},
"component-emitter": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.0.tgz",
"integrity": "sha1-zNETqGOI0GSC0D3j/H35hSa6jv4="
},
"component-inherit": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
"integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=",
"dev": true
},
"compressible": {
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.12.tgz",
@ -4580,6 +4637,63 @@
"once": "1.4.0"
}
},
"engine.io-client": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.5.tgz",
"integrity": "sha512-AYTgHyeVUPitsseqjoedjhYJapNVoSPShbZ+tEUX9/73jgZ/Z3sUlJf9oYgdEBBdVhupUpUqSxH0kBCXlQnmZg==",
"dev": true,
"requires": {
"component-emitter": "1.2.1",
"component-inherit": "0.0.3",
"debug": "2.3.3",
"engine.io-parser": "1.3.2",
"has-cors": "1.1.0",
"indexof": "0.0.1",
"parsejson": "0.0.3",
"parseqs": "0.0.5",
"parseuri": "0.0.5",
"ws": "1.1.5",
"xmlhttprequest-ssl": "1.5.3",
"yeast": "0.1.2"
},
"dependencies": {
"component-emitter": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
"integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
"dev": true
},
"debug": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz",
"integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=",
"dev": true,
"requires": {
"ms": "0.7.2"
}
},
"ms": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz",
"integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=",
"dev": true
}
}
},
"engine.io-parser": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.3.2.tgz",
"integrity": "sha1-k3sHnwAH0Ik+xW1GyyILjLQ1Igo=",
"dev": true,
"requires": {
"after": "0.8.2",
"arraybuffer.slice": "0.0.6",
"base64-arraybuffer": "0.1.5",
"blob": "0.0.4",
"has-binary": "0.1.7",
"wtf-8": "1.0.0"
}
},
"enhanced-resolve": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz",
@ -6984,6 +7098,21 @@
"ansi-regex": "2.1.1"
}
},
"has-binary": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz",
"integrity": "sha1-aOYesWIQyVRaClzOBqhzkS/h5ow=",
"dev": true,
"requires": {
"isarray": "0.0.1"
}
},
"has-cors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
"integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=",
"dev": true
},
"has-flag": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
@ -8387,6 +8516,12 @@
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"json3": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz",
"integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=",
"dev": true
},
"json5": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
@ -9816,6 +9951,12 @@
}
}
},
"mitt": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/mitt/-/mitt-1.1.3.tgz",
"integrity": "sha512-mUDCnVNsAi+eD6qA0HkRkwYczbLHJ49z17BGe2PYRhZL4wpZUFZGJHU7/5tmvohoma+Hdn0Vh/oJTiPEmgSruA==",
"dev": true
},
"mixin-object": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz",
@ -10395,6 +10536,12 @@
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-component": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz",
"integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=",
"dev": true
},
"object-keys": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz",
@ -10618,6 +10765,33 @@
"error-ex": "1.3.1"
}
},
"parsejson": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz",
"integrity": "sha1-q343WfIJ7OmUN5c/fQ8fZK4OZKs=",
"dev": true,
"requires": {
"better-assert": "1.0.2"
}
},
"parseqs": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz",
"integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=",
"dev": true,
"requires": {
"better-assert": "1.0.2"
}
},
"parseuri": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz",
"integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=",
"dev": true,
"requires": {
"better-assert": "1.0.2"
}
},
"parseurl": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
@ -11960,6 +12134,21 @@
}
}
},
"ramda": {
"version": "0.24.1",
"resolved": "https://registry.npmjs.org/ramda/-/ramda-0.24.1.tgz",
"integrity": "sha1-w7d1UZfzW43DUCIoJixMkd22uFc=",
"dev": true
},
"ramdasauce": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/ramdasauce/-/ramdasauce-2.1.0.tgz",
"integrity": "sha512-BdHm//tlCCmeXxY5EvIvlczuWvZU5QcRybdxZ4mkDOIasWzbBs+bjt3iEVsThKCMWLIiFZpggtQmIyjtL7eOvA==",
"dev": true,
"requires": {
"ramda": "0.24.1"
}
},
"random-bytes": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
@ -12610,6 +12799,33 @@
"velocity-react": "1.3.3"
}
},
"reactotron-core-client": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/reactotron-core-client/-/reactotron-core-client-1.13.0.tgz",
"integrity": "sha512-dX2tKjGlZ9sPETLV2r8/K93acfdnGs6oi0r+0x1xdAitaNqtd9O7oiZZc+dBqFHZB3Tz1aooAlMsjD6PVFidCg==",
"dev": true,
"requires": {
"json-stringify-safe": "5.0.1",
"ramda": "0.24.1",
"ramdasauce": "2.1.0"
}
},
"reactotron-react-native": {
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/reactotron-react-native/-/reactotron-react-native-1.14.0.tgz",
"integrity": "sha512-jyx5EOmqHGrdOzL0pksso4qDFZQRiD6zycM3KgIN3Nq49HmOofDjdOEoN/b4V+W1ftvEp/gjc/S5HXWmCh+dUQ==",
"dev": true,
"requires": {
"json-stringify-safe": "5.0.1",
"mitt": "1.1.3",
"prop-types": "15.6.0",
"ramda": "0.24.1",
"ramdasauce": "2.1.0",
"reactotron-core-client": "1.13.0",
"rn-host-detect": "1.1.3",
"socket.io-client": "1.7.4"
}
},
"read-all-stream": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz",
@ -13878,6 +14094,83 @@
"then-fs": "2.0.0"
}
},
"socket.io-client": {
"version": "1.7.4",
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.7.4.tgz",
"integrity": "sha1-7J+CA1btme9tNX8HVtZIcXvdQoE=",
"dev": true,
"requires": {
"backo2": "1.0.2",
"component-bind": "1.0.0",
"component-emitter": "1.2.1",
"debug": "2.3.3",
"engine.io-client": "1.8.5",
"has-binary": "0.1.7",
"indexof": "0.0.1",
"object-component": "0.0.3",
"parseuri": "0.0.5",
"socket.io-parser": "2.3.1",
"to-array": "0.1.4"
},
"dependencies": {
"component-emitter": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
"integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
"dev": true
},
"debug": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz",
"integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=",
"dev": true,
"requires": {
"ms": "0.7.2"
}
},
"ms": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz",
"integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=",
"dev": true
}
}
},
"socket.io-parser": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.3.1.tgz",
"integrity": "sha1-3VMgJRA85Clpcya+/WQAX8/ltKA=",
"dev": true,
"requires": {
"component-emitter": "1.1.2",
"debug": "2.2.0",
"isarray": "0.0.1",
"json3": "3.3.2"
},
"dependencies": {
"component-emitter": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz",
"integrity": "sha1-KWWU8nU9qmOZbSrwjRWpURbJrsM=",
"dev": true
},
"debug": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
"dev": true,
"requires": {
"ms": "0.7.1"
}
},
"ms": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=",
"dev": true
}
}
},
"socketcluster-client": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/socketcluster-client/-/socketcluster-client-5.5.2.tgz",
@ -14634,6 +14927,12 @@
"resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz",
"integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE="
},
"to-array": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz",
"integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=",
"dev": true
},
"to-arraybuffer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
@ -15422,6 +15721,12 @@
}
}
},
"wtf-8": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wtf-8/-/wtf-8-1.0.0.tgz",
"integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=",
"dev": true
},
"xcode": {
"version": "0.9.3",
"resolved": "https://registry.npmjs.org/xcode/-/xcode-0.9.3.tgz",
@ -15497,6 +15802,12 @@
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
"integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk="
},
"xmlhttprequest-ssl": {
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz",
"integrity": "sha1-GFqIjATspGw+QHDZn3tJ3jUomS0=",
"dev": true
},
"xpipe": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/xpipe/-/xpipe-1.0.5.tgz",
@ -15554,6 +15865,12 @@
"fd-slicer": "1.0.1"
}
},
"yeast": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
"integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",
"dev": true
},
"zip": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/zip/-/zip-1.2.0.tgz",

View File

@ -87,7 +87,8 @@
"jest": "^22.0.3",
"jest-cli": "^22.0.3",
"react-dom": "^16.2.0",
"react-test-renderer": "^16.2.0"
"react-test-renderer": "^16.2.0",
"reactotron-react-native": "^1.14.0"
},
"jest": {
"preset": "react-native",