Skip to content
This repository was archived by the owner on Jan 5, 2022. It is now read-only.

Commit ff979e1

Browse files
authored
Support react-navigation@next (v5) (#103)
* remove all files * setup clean lib * set skeleton example * basic setup of react-navigation@next * Migrate the lib for v5 (normal stack) (#104) * first try out with the default header * cclean-up screens * set opacity on header * move collapsible files to module * tsconfig configure paths * add dimention listener * leave note * support orientation change * add iOSCollapsedColor * resolve re-mount problem on orientation change * configure lint * update README * update README * v5.0.0-alpha0 * add emoji on README * add sample GIF * split code * rename file * update compatibility * update compatibility * v5.0.0-alpha1 * remove hoist-non-react-statics * fix scrollIndicatorInsetTop * update badge * v5.0.0-alpha2 * Sub-header (search bar) for v5 (#106) * add example for sub-header * add CollapsibleStackSub * add demo GIF * update README * v5.0.0-alpha3 * Update README.md * Update README.md * fix orientation change crash * v5.0.0-alpha4 * roll back master change
1 parent e4155fb commit ff979e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3066
-3268
lines changed

.eslintrc

-18
This file was deleted.

.eslintrc.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
env: {
3+
es6: true,
4+
browser: true,
5+
},
6+
extends: [
7+
'eslint:recommended',
8+
'plugin:react/recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
'prettier',
11+
],
12+
parser: '@typescript-eslint/parser',
13+
parserOptions: {
14+
ecmaFeatures: {
15+
jsx: true,
16+
},
17+
ecmaVersion: 2018,
18+
sourceType: 'module',
19+
},
20+
plugins: ['react', '@typescript-eslint', 'prettier'],
21+
rules: {
22+
'prettier/prettier': 'error',
23+
'@typescript-eslint/explicit-function-return-type': 'off',
24+
'@typescript-eslint/ban-ts-ignore': 'warn',
25+
},
26+
};

.gitignore

+1-39
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,6 @@
1-
21
# OSX
32
#
43
.DS_Store
54

6-
# node.js
7-
#
85
node_modules/
9-
npm-debug.log
10-
yarn-error.log
11-
12-
# Xcode
13-
#
14-
build/
15-
*.pbxuser
16-
!default.pbxuser
17-
*.mode1v3
18-
!default.mode1v3
19-
*.mode2v3
20-
!default.mode2v3
21-
*.perspectivev3
22-
!default.perspectivev3
23-
xcuserdata
24-
*.xccheckout
25-
*.moved-aside
26-
DerivedData
27-
*.hmap
28-
*.ipa
29-
*.xcuserstate
30-
project.xcworkspace
31-
32-
33-
# Android/IntelliJ
34-
#
35-
build/
36-
.idea
37-
.gradle
38-
local.properties
39-
*.iml
40-
41-
# BUCK
42-
buck-out/
43-
\.buckd/
44-
*.keystore
6+
lib/

.npmignore

-50
This file was deleted.

.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"bracketSpacing": true,
3+
"jsxBracketSameLine": true,
4+
"singleQuote": true,
5+
"trailingComma": "es5"
6+
}

.travis.yml

-16
This file was deleted.

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.formatOnSave": true
3+
}

Makefile

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
update-example-rn:
22
mkdir tmp
3-
cp -r example/src tmp
4-
cp example/.vscode/launch.json tmp
3+
cp -r example/src example/App.tsx example/babel.config.js example/metro.config.js tmp
54
rm -rf example
65
npx react-native init example --template react-native-template-typescript
7-
cp -r tmp/src example
8-
sh -c 'cd example && mkdir .vscode'
9-
cp tmp/launch.json example/.vscode
6+
cp -r tmp/* example
107
rm -rf tmp
11-
rm example/App.tsx
12-
sed -i '' "s/import App from '.\/App';/import App from '.\/src\/App';/" example/index.js
13-
sh -c 'cd example && yarn add react-navigation react-native-reanimated react-native-gesture-handler react-navigation-stack react-navigation-tabs'
14-
sh -c 'cd example && yarn add react-navigation-collapsible'
15-
sh -c 'cd example && cd ios && pod install'
8+
# uninstall @types/react-native
9+
cd example && yarn remove @types/react-native
10+
cd example && yarn add -D babel-plugin-module-resolver
11+
# install react-navigation@next (v5)
12+
cd example && yarn add @react-navigation/native@next @react-navigation/stack@next @react-native-community/masked-view
13+
cd example && yarn add react-native-gesture-handler react-native-screens react-native-safe-area-context
14+
# install peer-dependencies
15+
cd example && cd ios && pod install

0 commit comments

Comments
 (0)