Skip to content

Commit 902cb20

Browse files
authored
Chore: Upgrade dependencies in example (#122)
* Chore: Upgrade dependencies in example * Delete dead code * Updated circle config * Edited flowconfig. Ignore examples node-modules
1 parent 43ed6c7 commit 902cb20

12 files changed

+10066
-1959
lines changed

.circleci/config.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
aliases:
2-
32
- &restore-cache
43
keys:
54
- dependencies-{{ checksum "package.json" }}
@@ -43,8 +42,8 @@ aliases:
4342

4443
defaults: &defaults
4544
working_directory: ~/react-native-ios-kit
46-
docker:
47-
- image: circleci/node:6
45+
docker:
46+
- image: circleci/node:10
4847

4948
version: 2
5049
jobs:
@@ -85,12 +84,12 @@ jobs:
8584
at: ~/react-native-ios-kit
8685
- add_ssh_keys:
8786
fingerprints:
88-
- "11:06:5b:a1:d0:c5:8a:49:cd:8d:05:7f:d9:7d:15:3d"
87+
- '11:06:5b:a1:d0:c5:8a:49:cd:8d:05:7f:d9:7d:15:3d'
8988
- run: |
9089
echo "Deploying website..."
9190
git config --global user.name "$CIRCLE_USERNAME"
9291
git config --global user.email "[email protected]"
93-
cd website && GIT_USER="$CIRCLE_USERNAME" USE_SSH=true yarn run docusaurus-publish
92+
cd website && GIT_USER="$CIRCLE_USERNAME" USE_SSH=true yarn run docusaurus-publish
9493
publish-expo:
9594
<<: *defaults
9695
steps:
@@ -112,20 +111,20 @@ jobs:
112111
workflows:
113112
version: 2
114113

115-
website:
114+
website:
116115
jobs:
117116
- install-dependencies
118117
- tests:
119118
requires:
120119
- install-dependencies
121120
filters: *filter-ignore-gh-pages
122121
- deploy:
123-
filters: *filter-tag
122+
filters: *filter-tag
124123
- deploy-website:
125124
requires:
126125
- deploy
127126
filters: *filter-only-master
128127
- publish-expo:
129128
requires:
130129
- deploy
131-
filters: *filter-only-master
130+
filters: *filter-only-master

.flowconfig

+1-15
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,7 @@
1818
.*/Libraries/polyfills/.*
1919

2020
; Ignore duplicate modules under example/
21-
.*/example/node_modules/fbjs/.*
22-
.*/example/node_modules/fbemitter/.*
23-
.*/example/node_modules/react/.*
24-
.*/example/node_modules/react-native/.*
25-
.*/example/node_modules/expo/.*
26-
.*/example/node_modules/xdl
27-
.*/example/node_modules/reqwest
28-
.*/example/\.buckd/
29-
.*/example/node_modules/react-native-tab-view
30-
.*/example/node_modules/react-navigation
31-
.*/example/node_modules/react-native-fbads
32-
.*/example/node_modules/react-native-gesture-handler
33-
.*/example/node_modules/metro-bundler
34-
.*/example/node_modules/exp
35-
.*/example/node_modules/@expo
21+
<PROJECT_ROOT>/example/node_modules/*
3622

3723
; Ignore duplicate modules under website/
3824
.*/website/node_modules/fbjs/.*

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,19 @@ Example:
112112
```
113113
This code will change icon color to `green`
114114

115+
## Documentation
116+
117+
Check the components and their usage in our [documentation](https://callstack.github.io/react-native-ios-kit).
118+
119+
120+
## Contributing
121+
122+
Read the [contribution guidelines](/CONTRIBUTING.md) before contributing.
123+
124+
## Made with ❤️ at Callstack
125+
126+
`react-native-ios-kit` is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Callstack][callstack-readme-with-love] is a group of React and React Native geeks, contact us at [[email protected]](mailto:[email protected]) if you need any help with these or just want to say hi!
127+
115128

116129
<!-- badges -->
117130
[build-badge]: https://img.shields.io/circleci/project/github/callstack/react-native-ios-kit/master.svg?style=flat-square

example/.babelrc

-13
This file was deleted.

example/app.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "An empty new project",
55
"slug": "react-native-ios-kit",
66
"privacy": "public",
7-
"sdkVersion": "23.0.0",
7+
"sdkVersion": "32.0.0",
88
"version": "1.0.0",
99
"orientation": "portrait",
1010
"primaryColor": "#cccccc",
@@ -15,7 +15,7 @@
1515
},
1616
"packagerOpts": {
1717
"assetExts": ["ttf", "mp4"],
18-
"config": "./rn-cli.config.js",
18+
"config": "./metro.config.js",
1919
"projectRoots": ""
2020
},
2121
"ios": {

example/babel.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* eslint-disable import/no-commonjs */
2+
module.exports = {
3+
presets: ['expo'],
4+
plugins: [
5+
[
6+
'module-resolver',
7+
{
8+
alias: {
9+
'react-native-ios-kit': '../src/index',
10+
'react-native-vector-icons': '@expo/vector-icons',
11+
},
12+
},
13+
],
14+
],
15+
};

example/metro.config.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* eslint-disable import/no-commonjs */
2+
3+
const path = require('path');
4+
const blacklist = require('metro-config/src/defaults/blacklist');
5+
const pak = require('../package.json');
6+
const escape = require('escape-string-regexp');
7+
8+
const dependencies = Object.keys(pak.dependencies);
9+
10+
module.exports = {
11+
projectRoot: __dirname,
12+
watchFolders: [path.resolve(__dirname, '..')],
13+
resolver: {
14+
blacklistRE: blacklist([
15+
new RegExp(
16+
`^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$`
17+
),
18+
new RegExp(
19+
`^${escape(
20+
path.resolve(__dirname, '..', 'website', 'node_modules')
21+
)}\\/.*$`
22+
),
23+
]),
24+
providesModuleNodeModules: [
25+
'react-native',
26+
'react',
27+
'@expo/vector-icons',
28+
'@babel/runtime',
29+
'prop-types',
30+
...dependencies,
31+
],
32+
},
33+
};

example/package.json

+22-10
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,35 @@
66
"private": true,
77
"main": "node_modules/expo/AppEntry.js",
88
"scripts": {
9-
"start": "react-native-scripts start",
10-
"android": "react-native-scripts android",
11-
"ios": "react-native-scripts ios"
9+
"start": "expo start",
10+
"android": "expo android",
11+
"ios": "expo ios"
1212
},
1313
"dependencies": {
1414
"color": "^2.0.1",
1515
"exp": "^47.3.17",
16-
"expo": "^23.0.0",
16+
"expo": "^32.0.0",
1717
"glob-to-regexp": "^0.3.0",
18-
"prop-types": "^15.6.0",
19-
"react": "^16.0.0-alpha.12",
20-
"react-native": "https://github.com/expo/react-native/archive/sdk-23.0.0.tar.gz",
18+
"prop-types": "15.6.0",
19+
"react": "16.5.0",
20+
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
2121
"react-native-safe-area-view": "^0.2.0"
2222
},
2323
"devDependencies": {
24-
"babel-plugin-module-resolver": "^2.7.1",
25-
"babel-preset-expo": "^4.0.0",
26-
"react-native-scripts": "^1.5.0"
24+
"@babel/plugin-proposal-class-properties": "^7.3.0",
25+
"@babel/plugin-proposal-object-rest-spread": "^7.3.1",
26+
"@babel/preset-env": "^7.3.1",
27+
"@babel/preset-flow": "^7.0.0",
28+
"@babel/preset-react": "^7.0.0",
29+
"babel-loader": "^8.0.5",
30+
"babel-plugin-module-resolver": "^3.1.1",
31+
"babel-preset-expo": "^5.0.0",
32+
"expo-cli": "^2.3.8"
33+
},
34+
"resolutions": {
35+
"**/react": "16.5.0",
36+
"**/prop-types": "15.6.0",
37+
"**/color": "2.0.1",
38+
"**/lodash": "^4.17.4"
2739
}
2840
}

example/rn-cli.config.js

-20
This file was deleted.

0 commit comments

Comments
 (0)