Skip to content

Commit d717f9e

Browse files
authored
Merge pull request #20 from AmitM30/dev
Upgrade R, RN, RNN
2 parents c04d457 + ea31f04 commit d717f9e

File tree

10 files changed

+1181
-594
lines changed

10 files changed

+1181
-594
lines changed

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
# React Native Typescript Boilerplate
22

3-
![License](https://img.shields.io/github/license/AmitM30/react-native-typescript-boilerplate.svg) ![Travis](https://api.travis-ci.com/AmitM30/react-native-typescript-boilerplate.svg?branch=master)
3+
![Travis](https://api.travis-ci.com/AmitM30/react-native-typescript-boilerplate.svg?branch=master) ![License](https://img.shields.io/github/license/AmitM30/react-native-typescript-boilerplate.svg) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)
44

55
### An opinionated [React Native](https://facebook.github.io/react-native/docs/getting-started) Starter Kit with [React Native Navigation](https://github.com/wix/react-native-navigation) + [Redux](https://github.com/reactjs/redux) + [TSLint](https://github.com/airbnb/javascript) to build iOS / Android apps using [TypeScript](https://github.com/Microsoft/TypeScript-React-Native-Starter)
66

77
The project has been setup based off [RN Getting Started](https://facebook.github.io/react-native/docs/getting-started) and instructions from [Microsoft's Github TypeScript React Native Starter](https://github.com/Microsoft/TypeScript-React-Native-Starter) repo.
88

99
This repo supports the latest version of React Native (v0.57.8+) supported by RNN (at the time of writing).
1010

11+
**UPDATE** (8th March '19): RNN upgraded to v2.13.1 | RN to 0.58.6 | React to 16.8.4
12+
1113
### Who is this for?
1214

13-
Someone looking to jumpstart building apps using RN and loves TS. The base setup has been taken care of, just `npm install` and get going.
15+
Someone looking to jumpstart building apps using RN and prefers TS. The base setup has been taken care of, just `yarn install` and get going from respective IDEs.
1416

1517
You might also want to [rename](https://medium.com/the-react-native-log/how-to-rename-a-react-native-app-dafd92161c35) the app for your own use.
1618

17-
_Disclaimer_:
18-
This is an **opinionated** approach to building apps with RN. The project structure is inspired by multiple production apps built by the contributors.
19+
> _Disclaimer_: This is an **opinionated** approach to building apps with RN. The project structure is inspired by multiple production apps built by the contributors.
1920
2021
The project uses and encourages to use industry best practices / tools / libraries like RNN, redux, tslint, separation of concern and structure to build a maintainable app.
2122

@@ -102,19 +103,13 @@ Launch application from XCode
102103

103104
###### Android
104105

105-
For android, you will need to first create the bundle:
106-
107-
```
108-
react-native bundle --platform ios --entry-file index.js --bundle-output ./ios/main.jsbundle --assets-dest ./ --dev false
109-
```
110-
111-
then run the Metro Bundler from the terminal
106+
For android, run the Metro Bundler from the terminal
112107

113108
```
114109
npm run start
115110
```
116111

117-
and the launch from IDE.
112+
and then launch from IDE.
118113

119114
#### Lint
120115

@@ -172,6 +167,7 @@ Please check out [Contributing](https://github.com/AmitM30/react-native-typescri
172167
#### Authors
173168

174169
- [**Anurag Chutani**](https://github.com/a7urag) - _Android Setup_
170+
- [**Brian Varley**](https://github.com/BrianJVarley) - _Windows Setup_
175171

176172
See also the list of [contributors](https://github.com/AmitM30/react-native-typescript-boilerplate/contributors) who participated in this project.
177173

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ android {
147147
dependencies {
148148
implementation fileTree(dir: "libs", include: ["*.jar"])
149149
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
150-
implementation "com.facebook.react:react-native:0.57.8" // From node_modules
150+
implementation "com.facebook.react:react-native:+" // From node_modules
151151
implementation project(':react-native-navigation')
152152

153153
implementation "com.android.support:design:${rootProject.ext.supportLibVersion}"

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "27.0.3"
5+
buildToolsVersion = "28.0.3"
66
minSdkVersion = 19
77
compileSdkVersion = 28
88
targetSdkVersion = 26
@@ -15,7 +15,7 @@ buildscript {
1515
jcenter()
1616
}
1717
dependencies {
18-
classpath 'com.android.tools.build:gradle:3.1.4'
18+
classpath 'com.android.tools.build:gradle:3.3.0'
1919

2020
// NOTE: Do not place your application dependencies here; they belong
2121
// in the individual module build.gradle files

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

metro.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Metro configuration for React Native
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
*/
7+
8+
module.exports = {
9+
transformer: {
10+
getTransformOptions: async () => ({
11+
transform: {
12+
experimentalImportSupport: false,
13+
inlineRequires: false
14+
}
15+
})
16+
}
17+
};

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"boilerplate",
88
"react native navigation"
99
],
10-
"version": "0.1.0",
10+
"version": "v0.2.2",
1111
"author": {
1212
"name": "Amit Mangal",
1313
"email": "[email protected]",
@@ -30,10 +30,10 @@
3030
"lint:fix": "cross-env-shell tslint --fix --project ./tsconfig.json"
3131
},
3232
"dependencies": {
33-
"react": "16.6.3",
34-
"react-native": "0.57.8",
35-
"react-native-navigation": "^2.8.0",
36-
"react-redux": "^6.0.0",
33+
"react": "^16.8.6",
34+
"react-native": "^0.59.5",
35+
"react-native-navigation": "^2.18.3",
36+
"react-redux": "^7.0.3",
3737
"redux": "^4.0.1",
3838
"redux-logger": "^3.0.6",
3939
"redux-thunk": "^2.3.0"
@@ -54,23 +54,23 @@
5454
"babel-preset-airbnb": "^3.2.0",
5555
"babel-preset-react-native": "^4.0.1",
5656
"cross-env": "^5.2.0",
57-
"eslint": "^5.12.1",
57+
"eslint": "^5.16.0",
5858
"eslint-config-airbnb": "^17.1.0",
5959
"eslint-plugin-import": "^2.14.0",
6060
"eslint-plugin-jest": "^22.1.2",
6161
"eslint-plugin-jsx-a11y": "^6.1.2",
6262
"eslint-plugin-react": "^7.12.2",
6363
"eslint-watch": "^4.0.2",
64-
"jest": "24.0.0",
64+
"jest": "^24.7.1",
6565
"metro-react-native-babel-preset": "^0.51.1",
6666
"react-addons-test-utils": "^15.6.2",
6767
"react-native-typescript-transformer": "^1.2.11",
6868
"react-test-renderer": "16.6.3",
6969
"regenerator-runtime": "^0.13.1",
7070
"ts-jest": "^23.10.5",
71-
"tslint": "^5.12.1",
71+
"tslint": "^5.16.0",
7272
"tslint-config-airbnb": "^5.11.1",
73-
"typescript": "^3.2.4"
73+
"typescript": "^3.4.5"
7474
},
7575
"jest": {
7676
"preset": "react-native",

src/navigators/navigation.tsx

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ export const tabbedNavigation = () =>
2626
passProps: {
2727
text: 'This is Home',
2828
},
29-
options: {
30-
topBar: {
31-
visible: false,
32-
drawBehind: true,
33-
animate: true,
34-
},
35-
bottomTab: {
36-
fontSize: 12,
37-
text: 'Home',
38-
textColor: TYPOGRAPHY.COLOR.Primary,
39-
selectedTextColor: TYPOGRAPHY.COLOR.Secondary,
40-
icon: require('../view/assets/images/tabbar/home.png'),
41-
selectedIcon: require('../view/assets/images/tabbar/home.png'),
42-
},
43-
},
4429
},
4530
},
4631
],
32+
options: {
33+
topBar: {
34+
visible: false,
35+
drawBehind: true,
36+
animate: true,
37+
},
38+
bottomTab: {
39+
fontSize: 12,
40+
text: 'Home',
41+
textColor: TYPOGRAPHY.COLOR.Primary,
42+
selectedTextColor: TYPOGRAPHY.COLOR.Secondary,
43+
icon: require('../view/assets/images/tabbar/home.png'),
44+
selectedIcon: require('../view/assets/images/tabbar/home.png'),
45+
},
46+
},
4747
},
4848
},
4949
{
@@ -52,35 +52,27 @@ export const tabbedNavigation = () =>
5252
{
5353
component: {
5454
name: SCREENS.Settings,
55-
options: {
56-
topBar: {
57-
visible: false,
58-
drawBehind: true,
59-
animate: true,
60-
},
61-
bottomTab: {
62-
text: 'Settings',
63-
fontSize: 12,
64-
textColor: TYPOGRAPHY.COLOR.Primary,
65-
selectedTextColor: TYPOGRAPHY.COLOR.Secondary,
66-
icon: require('../view/assets/images/tabbar/settings.png'),
67-
selectedIcon: require('../view/assets/images/tabbar/settings.png'),
68-
},
69-
},
7055
},
7156
},
7257
],
58+
options: {
59+
topBar: {
60+
visible: false,
61+
drawBehind: true,
62+
animate: true,
63+
},
64+
bottomTab: {
65+
text: 'Settings',
66+
fontSize: 12,
67+
textColor: TYPOGRAPHY.COLOR.Primary,
68+
selectedTextColor: TYPOGRAPHY.COLOR.Secondary,
69+
icon: require('../view/assets/images/tabbar/settings.png'),
70+
selectedIcon: require('../view/assets/images/tabbar/settings.png'),
71+
},
72+
},
7373
},
7474
},
7575
],
76-
options: {
77-
bottomTabs: {
78-
visible: true,
79-
titleDisplayMode: 'alwaysShow',
80-
backgroundColor: TYPOGRAPHY.COLOR.Default,
81-
drawBehind: true,
82-
},
83-
},
8476
},
8577
},
8678
});

src/view/assets/images/sample/1.png

-15.9 KB
Loading

src/view/assets/images/sample/2.png

-6.54 KB
Loading

0 commit comments

Comments
 (0)