Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ jobs:
- name: Typecheck files
run: yarn typecheck

test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage

build-library:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -97,7 +85,7 @@ jobs:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
key: ${{ runner.os }}-gradle-${{ hashFiles('apps/example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

Expand Down Expand Up @@ -153,7 +141,7 @@ jobs:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-newarch-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
key: ${{ runner.os }}-gradle-newarch-${{ hashFiles('apps/example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-newarch-

Expand Down Expand Up @@ -193,7 +181,7 @@ jobs:
- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
cd example
cd apps/example
pod install --project-directory=ios
env:
NO_FLIPPER: 1
Expand Down Expand Up @@ -233,7 +221,7 @@ jobs:
- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
cd example
cd apps/example
pod install --project-directory=ios
env:
RCT_NEW_ARCH_ENABLED: 1
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
21 changes: 21 additions & 0 deletions apps/example/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const path = require('path');
const pak = require('../../packages/react-native-bottom-tabs/package.json');

module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
[
'module-resolver',
{
extensions: ['.tsx', '.ts', '.js', '.json'],
alias: {
'react-native-bottom-tabs': path.join(
__dirname,
'../../packages/react-native-bottom-tabs',
pak.source
),
},
},
],
],
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions example/ios/Podfile.lock → apps/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-bottom-tabs (0.5.0):
- react-native-bottom-tabs (0.5.2):
- DoubleConversion
- glog
- RCT-Folly (= 2024.01.01.00)
Expand All @@ -1222,7 +1222,7 @@ PODS:
- React-graphics
- React-ImageManager
- React-jsi
- react-native-bottom-tabs/common (= 0.5.0)
- react-native-bottom-tabs/common (= 0.5.2)
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
Expand All @@ -1234,7 +1234,7 @@ PODS:
- SDWebImageSVGCoder (>= 1.7.0)
- SwiftUIIntrospect (~> 1.0)
- Yoga
- react-native-bottom-tabs/common (0.5.0):
- react-native-bottom-tabs/common (0.5.2):
- DoubleConversion
- glog
- RCT-Folly (= 2024.01.01.00)
Expand Down Expand Up @@ -1728,7 +1728,7 @@ DEPENDENCIES:
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
- React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
- react-native-bottom-tabs (from `../..`)
- react-native-bottom-tabs (from `../node_modules/react-native-bottom-tabs`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
Expand Down Expand Up @@ -1842,7 +1842,7 @@ EXTERNAL SOURCES:
React-microtasksnativemodule:
:path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks"
react-native-bottom-tabs:
:path: "../.."
:path: "../node_modules/react-native-bottom-tabs"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
React-nativeconfig:
Expand Down Expand Up @@ -1945,7 +1945,7 @@ SPEC CHECKSUMS:
React-logger: 4072f39df335ca443932e0ccece41fbeb5ca8404
React-Mapbuffer: 714f2fae68edcabfc332b754e9fbaa8cfc68fdd4
React-microtasksnativemodule: 2eb1a69d35e700f752944644c0295cf7161d06c5
react-native-bottom-tabs: fde2fbce1c50e4df9288e0d4f983301e02e88d81
react-native-bottom-tabs: 402d19b4a55e6e17c78736a9dd2592cd9864881e
react-native-safe-area-context: c6e59b0ac0acb3ddc3247235215775441ca1b2ff
React-nativeconfig: 4a9543185905fe41014c06776bf126083795aed9
React-NativeModulesApple: 651670a799672bd54469f2981d91493dda361ddf
Expand All @@ -1972,7 +1972,7 @@ SPEC CHECKSUMS:
React-utils: b2baee839fb869f732d617b97dcfa384b4b4fdb3
ReactCodegen: f177b8fd67788c5c6ff45a39c7482c5f8d77ace6
ReactCommon: 627bd3192ef01a351e804e9709673d3741d38fec
ReactNativeHost: 8f602474a76f43f2cd7823fa00575b4beb107b21
ReactNativeHost: a3cd2bc15b6deac7439318607ce5637d8a93a117
ReactTestApp-DevSupport: 74ff23aba1f35caa74d1dd5346c2835e0af31770
ReactTestApp-Resources: f9d4fd5651f8e68f6362f7e5374c7aca3b381c94
RNGestureHandler: 6a34af1ea5d9321af615933c271b0c37a00ff473
Expand All @@ -1982,8 +1982,8 @@ SPEC CHECKSUMS:
SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
SwiftUIIntrospect: fee9aa07293ee280373a591e1824e8ddc869ba5d
Yoga: 4ef80d96a5534f0e01b3055f17d1e19a9fc61b63
Yoga: 1354c027ab07c7736f99a3bef16172d6f1b12b47

PODFILE CHECKSUM: 1c1dbca3e400ef935aa9a150cb2dcb58fb8c4536

COCOAPODS: 1.15.2
COCOAPODS: 1.14.3
20 changes: 20 additions & 0 deletions apps/example/metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { makeMetroConfig } = require("@rnx-kit/metro-config");
const path = require('path');

const root = path.resolve(__dirname, '../..');

const extraConfig = {
watchFolders: [root],
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};

const metroConfig = makeMetroConfig(extraConfig);

module.exports = metroConfig;
1 change: 1 addition & 0 deletions example/package.json → apps/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"color": "^4.2.3",
"react": "18.3.1",
"react-native": "0.75.3",
"react-native-bottom-tabs": "*",
"react-native-gesture-handler": "^2.20.0",
"react-native-paper": "^5.12.5",
"react-native-safe-area-context": "^4.11.0",
Expand Down
19 changes: 19 additions & 0 deletions apps/example/react-native.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const project = (() => {
try {
const { configureProjects } = require("react-native-test-app");
return configureProjects({
android: {
sourceDir: "android",
},
ios: {
sourceDir: "ios",
}
});
} catch (_) {
return undefined;
}
})();

module.exports = {
...(project ? { project } : undefined),
};
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Article } from '../Screens/Article';
import { Albums } from '../Screens/Albums';
import { Contacts } from '../Screens/Contacts';
import { Chat } from '../Screens/Chat';
import { ColorValue } from 'react-native';
import type { ColorValue } from 'react-native';

interface Props {
ignoresTopSafeArea?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as React from 'react';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Article } from '../Screens/Article';
import { Albums } from '../Screens/Albums';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as React from 'react';
import { createMaterialBottomTabNavigator } from 'react-native-paper/react-navigation';
import { Article } from '../Screens/Article';
import { Albums } from '../Screens/Albums';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import * as React from 'react';
import { Article } from '../Screens/Article';
import { Albums } from '../Screens/Albums';
import { Contacts } from '../Screens/Contacts';
import { Chat } from '../Screens/Chat';
// This import works properly when library is published
import createNativeBottomTabNavigator from '../../../src/react-navigation/navigators/createNativeBottomTabNavigator';
import createNativeBottomTabNavigator from '../../../../packages/react-native-bottom-tabs/src/react-navigation/navigators/createNativeBottomTabNavigator';
import { Platform } from 'react-native';

const Tab = createNativeBottomTabNavigator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Article } from '../Screens/Article';
import { Albums } from '../Screens/Albums';
import { Contacts } from '../Screens/Contacts';
import { Chat } from '../Screens/Chat';
import createNativeBottomTabNavigator from '../../../src/react-navigation/navigators/createNativeBottomTabNavigator';
import createNativeBottomTabNavigator from '../../../../packages/react-native-bottom-tabs/src/react-navigation/navigators/createNativeBottomTabNavigator';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

const headerOptions = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import * as React from 'react';
import { Article } from '../Screens/Article';
import { Albums } from '../Screens/Albums';
import { Contacts } from '../Screens/Contacts';
import { Chat } from '../Screens/Chat';
// This import works properly when library is published
import createNativeBottomTabNavigator from '../../../src/react-navigation/navigators/createNativeBottomTabNavigator';
import createNativeBottomTabNavigator from '../../../../packages/react-native-bottom-tabs/src/react-navigation/navigators/createNativeBottomTabNavigator';

const Tab = createNativeBottomTabNavigator();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import * as React from 'react';
import { Article } from '../Screens/Article';
import { Albums } from '../Screens/Albums';
import { Contacts } from '../Screens/Contacts';
import { Chat } from '../Screens/Chat';
// This import works properly when library is published
import createNativeBottomTabNavigator from '../../../src/react-navigation/navigators/createNativeBottomTabNavigator';
import createNativeBottomTabNavigator from '../../../../packages/react-native-bottom-tabs/src/react-navigation/navigators/createNativeBottomTabNavigator';

const Tab = createNativeBottomTabNavigator();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import * as React from 'react';
import { Article } from '../Screens/Article';
import { Albums } from '../Screens/Albums';
import { Contacts } from '../Screens/Contacts';
import { Chat } from '../Screens/Chat';
// This import works properly when library is published
import createNativeBottomTabNavigator from '../../../src/react-navigation/navigators/createNativeBottomTabNavigator';
import createNativeBottomTabNavigator from '../../../../packages/react-native-bottom-tabs/src/react-navigation/navigators/createNativeBottomTabNavigator';
import { Platform } from 'react-native';

import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as React from 'react';
import TabView, { SceneMap } from 'react-native-bottom-tabs';
import { useState } from 'react';
import { Article } from '../Screens/Article';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as React from 'react';
import TabView, { SceneMap } from 'react-native-bottom-tabs';
import { useState } from 'react';
import { Article } from '../Screens/Article';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as React from 'react';
import TabView, { SceneMap } from 'react-native-bottom-tabs';
import { useState } from 'react';
import { Article } from '../Screens/Article';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions apps/example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"compilerOptions": {
"paths": {
"react-native-bottom-tabs": ["../../packages/react-native-bottom-tabs/src/index"],
"react-native-bottom-tabs/react-navigation": [
"../../packages/react-native-bottom-tabs/src/react-navigation/index"
]
},
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react-jsx",
"lib": ["ESNext"],
"module": "ESNext",
"moduleResolution": "Bundler",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noStrictGenericChecks": false,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ESNext",
"verbatimModuleSyntax": true
}
}
File renamed without changes.
File renamed without changes.
12 changes: 0 additions & 12 deletions example/babel.config.js

This file was deleted.

1 change: 0 additions & 1 deletion example/ios/.xcode.env

This file was deleted.

18 changes: 0 additions & 18 deletions example/metro.config.js

This file was deleted.

20 changes: 0 additions & 20 deletions example/react-native.config.js

This file was deleted.

Loading
Loading