Skip to content

Commit c54b046

Browse files
make example more clear + better for big screens
1 parent 396489f commit c54b046

File tree

6 files changed

+327
-281
lines changed

6 files changed

+327
-281
lines changed

docusaurus/docusaurus.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ const config = {
5959
position: 'left',
6060
label: 'Docs',
6161
},
62+
{
63+
href: 'https://www.reactnativepaperdates.com',
64+
label: 'Example',
65+
position: 'right',
66+
},
6267
{
6368
href: 'https://github.com/web-ridge/react-native-paper-dates',
6469
label: 'GitHub',

example/metro.config.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const path = require('path')
2-
const exclusionList = require('metro-config/src/defaults/exclusionList')
32
const escape = require('escape-string-regexp')
3+
const { getDefaultConfig } = require('@expo/metro-config')
4+
const exclusionList = require('metro-config/src/defaults/exclusionList')
45
const pak = require('../package.json')
56

67
const root = path.resolve(__dirname, '..')
@@ -9,13 +10,19 @@ const modules = Object.keys({
910
...pak.peerDependencies,
1011
})
1112

13+
const defaultConfig = getDefaultConfig(__dirname)
14+
1215
module.exports = {
16+
...defaultConfig,
17+
1318
projectRoot: __dirname,
1419
watchFolders: [root],
1520

1621
// We need to make sure that only one version is loaded for peerDependencies
17-
// So we blacklist them at the root, and alias them to the versions in example's node_modules
22+
// So we block them at the root, and alias them to the versions in example's node_modules
1823
resolver: {
24+
...defaultConfig.resolver,
25+
1926
blacklistRE: exclusionList(
2027
modules.map(
2128
(m) =>
@@ -28,13 +35,4 @@ module.exports = {
2835
return acc
2936
}, {}),
3037
},
31-
32-
transformer: {
33-
getTransformOptions: async () => ({
34-
transform: {
35-
experimentalImportSupport: false,
36-
inlineRequires: true,
37-
},
38-
}),
39-
},
4038
}

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Example app for react-native-paper-dates",
44
"version": "0.0.1",
55
"private": true,
6-
"main": "index",
6+
"main": "node_modules/expo/AppEntry.js",
77
"scripts": {
88
"android": "expo start --android",
99
"ios": "expo start --ios",

0 commit comments

Comments
 (0)