Skip to content

Commit c26e370

Browse files
committed
- updating example version to 21
- updating peerDependencie to react-native 48
1 parent 1c49f05 commit c26e370

File tree

7 files changed

+39
-42
lines changed

7 files changed

+39
-42
lines changed

example/.flowconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ suppress_type=$FlowIssue
5252
suppress_type=$FlowFixMe
5353
suppress_type=$FixMe
5454

55-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-5]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
56-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-5]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
55+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
56+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
5757
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
5858
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
5959

6060
unsafe.enable_getters_and_setters=true
6161

6262
[version]
63-
^0.45.0
63+
^0.49.1

example/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules/
22
.expo/
33
npm-debug.*
4-
/package-lock.json

example/App.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -173,38 +173,38 @@ This is a text. Click [here](https://google.com) to open a link. Let's add some
173173
* i'm overriding the default h1 render function.
174174
*/
175175
const renderer = new AstRenderer({
176-
...defaultRenderFunctions,
177-
h1: (node, children, parents) => {
178-
return (
179-
<Text key={AstRenderer.getUniqueID()} style={{ backgroundColor: 'red' }}>{children}</Text>
180-
);
181-
},
182-
// added custom block element defined by plugin
183-
block: (node, children, parents) => {
184-
return (
185-
<Text key={AstRenderer.getUniqueID()} style={{ backgroundColor: 'green' }}>{children}</Text>
186-
);
187-
},
176+
...defaultRenderFunctions,
177+
h1: (node, children, parents) => {
178+
return (
179+
<Text key={AstRenderer.getUniqueID()} style={{ backgroundColor: 'red' }}>{children}</Text>
180+
);
181+
},
182+
// added custom block element defined by plugin
183+
block: (node, children, parents) => {
184+
return (
185+
<Text key={AstRenderer.getUniqueID()} style={{ backgroundColor: 'green' }}>{children}</Text>
186+
);
187+
},
188188
});
189189

190190
export default class App extends React.Component {
191-
render() {
192-
return (
193-
<View style={styles.container}>
194-
<ScrollView>
195-
<Text>Markdown</Text>
196-
<Text>--------</Text>
197-
<Markdown plugins={[]} children={markdownText} />
198-
</ScrollView>
199-
</View>
200-
);
201-
}
191+
render() {
192+
return (
193+
<View style={styles.container}>
194+
<ScrollView>
195+
<Text>Markdown</Text>
196+
<Text>--------</Text>
197+
<Markdown plugins={[]} children={markdownText} />
198+
</ScrollView>
199+
</View>
200+
);
201+
}
202202
}
203203

204204
const styles = StyleSheet.create({
205-
container: {
206-
flex: 1,
207-
backgroundColor: '#ffcc00',
208-
paddingTop: 20,
209-
},
205+
container: {
206+
flex: 1,
207+
backgroundColor: '#ffcc00',
208+
paddingTop: 20,
209+
},
210210
});

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ To set an app icon, set the `expo.icon` key in `app.json` to be either a local p
9292

9393
## Writing and Running Tests
9494

95-
This project is set up to use [jest](https://facebook.github.io/jest/) for tests. You can configure whatever testing strategy you like, but jest works out of the box. Create test files in directories called `__tests__` to have the files loaded by jest. See the [the template project](https://github.com/react-community/create-react-native-app/tree/master/react-native-scripts/template/__tests__) for an example test. The [jest documentation](https://facebook.github.io/jest/docs/getting-started.html) is also a wonderful resource, as is the [React Native testing tutorial](https://facebook.github.io/jest/docs/tutorial-react-native.html).
95+
This project is set up to use [jest](https://facebook.github.io/jest/) for tests. You can configure whatever testing strategy you like, but jest works out of the box. Create test files in directories called `__tests__` or with the `.test` extension to have the files loaded by jest. See the [the template project](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/App.test.js) for an example test. The [jest documentation](https://facebook.github.io/jest/docs/getting-started.html) is also a wonderful resource, as is the [React Native testing tutorial](https://facebook.github.io/jest/docs/tutorial-react-native.html).
9696

9797
## Environment Variables
9898

example/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"expo": {
3-
"sdkVersion": "18.0.0"
3+
"sdkVersion": "21.0.0"
44
}
55
}

example/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "example",
3-
"version": "0.1.1",
3+
"version": "0.1.0",
44
"private": true,
55
"devDependencies": {
6-
"jest-expo": "~18.0.0",
7-
"react-native-scripts": "0.0.50",
6+
"react-native-scripts": "1.5.0",
7+
"jest-expo": "^21.0.2",
88
"react-test-renderer": "16.0.0-alpha.12"
99
},
1010
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
@@ -19,9 +19,9 @@
1919
"preset": "jest-expo"
2020
},
2121
"dependencies": {
22-
"expo": "^18.0.3",
22+
"expo": "^21.0.0",
2323
"react": "16.0.0-alpha.12",
24-
"react-native": "0.49.*",
24+
"react-native": "^0.48.4",
2525
"react-native-markdown-renderer": "git+https://github.com/mientjan/react-native-markdown-renderer.git#develop"
2626
}
2727
}

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
},
3131
"peerDependencies": {
3232
"react": "16.0.0-alpha.12",
33-
"react-native": "0.46"
33+
"react-native": "0.48.*"
3434
}
3535
}
36-
37-

0 commit comments

Comments
 (0)