chore: configure bob and metro

This commit is contained in:
satyajit.happy
2019-04-17 14:47:03 +02:00
parent 8ca4085052
commit dee470829a
20 changed files with 2708 additions and 8275 deletions

View File

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

View File

@@ -1,11 +1,17 @@
{
"extends": "../.eslintrc",
'extends': '../.eslintrc',
"settings": {
"import/core-modules": [ "expo", "react-navigation-stack" ]
},
'settings':
{
'import/core-modules':
[
'react-navigation-stack',
'react-native-gesture-handler',
'react-native-vector-icons',
],
},
"rules": {
"react/prop-types": "off"
"react-native/no-inline-styles": "off"
}
}

View File

@@ -5,6 +5,10 @@
"slug": "react-navigation-stack-demo",
"sdkVersion": "32.0.0",
"version": "1.0.0",
"primaryColor": "#2196f3"
"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

@@ -6,24 +6,20 @@
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"postinstall": "rm -rf node_modules/react-navigation-stack/{.git,node_modules,example}"
"ios": "expo start --ios"
},
"dependencies": {
"@react-navigation/core": "^3.3.1",
"@react-navigation/native": "^3.4.1",
"expo": "32.0.6",
"hoist-non-react-statics": "^3.3.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-paper": "^2.2.0",
"react-navigation-stack": "../",
"react-navigation-drawer": "^1.1.0",
"react-navigation-tabs": "*",
"@react-navigation/core": "^3.0.0",
"@react-navigation/native": "^3.1.1",
"expo": "32.0.0",
"hoist-non-react-statics": "^2.5.0",
"prop-types": "^15.6.0"
"react-native-paper": "^2.15.2",
"react-navigation-drawer": "^1.2.1",
"react-navigation-tabs": "*"
},
"devDependencies": {
"babel-plugin-module-resolver": "^3.0.0",
"glob-to-regexp": "^0.3.0"
"babel-plugin-module-resolver": "^3.2.0"
}
}

File diff suppressed because it is too large Load Diff