-
-
Notifications
You must be signed in to change notification settings - Fork 1k
fix: web compatibility #406
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
Merged
kmagiera
merged 34 commits into
software-mansion:master
from
jaulz:fix/web-compatibility
Feb 25, 2019
+4,708
−617
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
94670f3
fix: web compatibility
96c8515
fix: implement TapGestureHandler
3867bfa
fix: treat enabled property as true if not set explicitely
a9cd8fb
fix: move Directions and State to separate modules
97236fd
fix: add dummy setNativeProps
ee685df
fix: use responder events
cd9bc75
fix: map Responder event properties
c62c1ee
fix: reduce memory footprint
b8bcc54
fix: support maxDurationMs in TapGestureHandler
f508722
fix: improve TapGestureHandler
107f5d7
fix: add web platform to example app
0dd754a
fix: change babel preset to react-native
59d1586
fix: remove GestureHandler.web.js and instead reuse GestureHandler.js
a586cea
fix: remove View wrapper from TapGestureHandler
b4343e0
fix: remove inheritance
f6bd3a9
fix: rename file suffixes
9fd9071
fix: rename file suffixes
c74b441
Merge branch 'master' into fix/web-compatibility
jaulz 4b485d4
fix: remove suffix
5cbb2c9
fix: remove suffix
251f13d
fix: remove suffix
ba0cdfc
fix(example): update android compile sdk version to 28
Jekiwijaya 19bb6b2
Merge pull request #1 from Jekiwijaya/fix/android/sdk-version
jaulz 831c3aa
fix: add new files to package.json
81019e2
fix: restore original binding
172f8df
fix: add files to package.json
jaulz 9d6dc77
fix: read directions from native module
362b23b
fix: add unsupported warnings
868ed93
fix: remove Alert.alert
23af89f
fix: remove drawer style
9304881
fix: improve structure for rendering
945c296
fix: force rerendering if public methods of Drawer are used
376b5b4
fix: use global alert
4f568bc
fix: add createHandler file
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { NativeModules } from 'react-native'; | ||
|
||
const { RNGestureHandlerModule } = NativeModules; | ||
|
||
export default RNGestureHandlerModule.Direction; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
RIGHT: 1, | ||
LEFT: 2, | ||
UP: 4, | ||
DOWN: 8, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { AppRegistry } from 'react-native'; | ||
|
||
import ExampleApp from './App'; | ||
|
||
AppRegistry.registerComponent('App', () => ExampleApp); | ||
AppRegistry.runApplication('App', { rootTag: document.getElementById('root') }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,17 @@ | ||
const blacklist = require('metro-config/src/defaults/blacklist'); | ||
const path = require('path'); | ||
const pkg = require('./package.json'); | ||
|
||
const glob = require('glob-to-regexp'); | ||
|
||
function getBlacklist() { | ||
const nodeModuleDirs = [ | ||
glob(`${path.resolve(__dirname, '..')}/node_modules/*`), | ||
glob(`${path.resolve(__dirname)}/node_modules/metro/node_modules/fbjs/*`), | ||
glob(`${path.resolve(__dirname)}/node_modules/*/node_modules/fbjs/*`), | ||
glob( | ||
`${path.resolve( | ||
__dirname | ||
)}/node_modules/create-react-context/node_modules/fbjs/*` | ||
), | ||
glob( | ||
`${path.resolve( | ||
__dirname | ||
)}/node_modules/create-react-class/node_modules/fbjs/*` | ||
), | ||
glob( | ||
`${path.resolve( | ||
__dirname | ||
)}/node_modules/react-navigation/node_modules/hoist-non-react-statics/*` | ||
), | ||
glob( | ||
`${path.resolve( | ||
__dirname | ||
)}/node_modules/react-navigation-tabs/node_modules/hoist-non-react-statics/*` | ||
), | ||
glob( | ||
`${path.resolve( | ||
__dirname | ||
)}/node_modules/react-native-safe-area-view/node_modules/hoist-non-react-statics/*` | ||
)}/node_modules/*/node_modules/hoist-non-react-statics/*` | ||
), | ||
]; | ||
return blacklist(nodeModuleDirs); | ||
|
@@ -39,14 +20,7 @@ function getBlacklist() { | |
module.exports = { | ||
resolver: { | ||
blacklistRE: getBlacklist(), | ||
providesModuleNodeModules: [ | ||
'react-native', | ||
'react', | ||
'invariant', | ||
'fbjs', | ||
'prop-types', | ||
'hoist-non-react-statics', | ||
], | ||
providesModuleNodeModules: Object.keys(pkg.dependencies), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👏 |
||
}, | ||
watchFolders: [path.resolve(__dirname, '..')], | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.