mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-18 18:49:40 +08:00
chore: configure bob and metro
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
{
|
||||
"presets": [
|
||||
"expo"
|
||||
],
|
||||
"plugins": [
|
||||
["module-resolver", {
|
||||
"alias": {
|
||||
"react-navigation-stack": "../src/index"
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
35
packages/stack/example/metro.config.js
Normal file
35
packages/stack/example/metro.config.js
Normal 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,
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -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
Reference in New Issue
Block a user