chore: configure bob and metro

This commit is contained in:
satyajit.happy
2019-04-17 16:29:20 +02:00
parent 85c4ac7608
commit a461168493
6 changed files with 733 additions and 397 deletions

View File

@@ -0,0 +1,12 @@
{
"presets": [
"expo"
],
"plugins": [
["module-resolver", {
"alias": {
"@react-navigation/core": "../src/index"
}
}]
]
}

View File

@@ -6,5 +6,9 @@
"sdkVersion": "32.0.0",
"version": "1.0.0",
"primaryColor": "#2196f3",
"packagerOpts": {
"config": "./metro.config.js",
"projectRoots": ""
}
}
}

View File

@@ -0,0 +1,35 @@
/* eslint-disable import/no-extraneous-dependencies, import/no-commonjs */
const path = require('path');
const blacklist = require('metro-config/src/defaults/blacklist');
const project = require('../package.json');
const escape = require('escape-string-regexp');
const projectDependencies = Object.keys({
...project.dependencies,
...project.peerDependencies,
});
module.exports = {
projectRoot: __dirname,
watchFolders: [path.resolve(__dirname, '..')],
resolver: {
blacklistRE: blacklist([
new RegExp(
`^${escape(
path.resolve(__dirname, 'node_modules', project.name)
)}\\/.*$`
),
new RegExp(
`^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$`
),
]),
providesModuleNodeModules: [
'@expo/vector-icons',
'@babel/runtime',
...projectDependencies,
],
},
};

View File

@@ -10,25 +10,23 @@
"postinstall": "rm -rf node_modules/@react-navigation/core/{.git,node_modules,example}"
},
"dependencies": {
"@react-navigation/core": "../",
"@react-navigation/native": "^3.1.4",
"@react-navigation/native": "^3.4.1",
"expo": "~32.0.0",
"hoist-non-react-statics": "^2.5.0",
"prop-types": "^15.6.0",
"query-string": "^6.2.0",
"hoist-non-react-statics": "^3.3.0",
"prop-types": "^15.7.2",
"query-string": "^6.4.2",
"react": "16.5.0",
"react-is": "^16.5.2",
"react-is": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-paper": "^2.2.8",
"react-navigation-stack": "^1.0.7",
"react-native-paper": "^2.15.2",
"react-navigation-stack": "^1.3.0",
"react-navigation-tabs": "^1.0.2"
},
"resolutions": {
"**/react": "16.6.3",
"**/prop-types": "15.6.2",
"**/hoist-non-react-statics": "2.5.5"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0"
"babel-preset-expo": "^5.1.1"
},
"resolutions": {
"**/react": "16.5.0",
"**/hoist-non-react-statics": "3.3.0"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -25,6 +25,6 @@
},
"typeAcquisition": {
"enable": true,
"include": ["prop-types", "react", "react-native"]
"include": ["react", "react-native"]
}
}