diff --git a/package.json b/package.json index 4a8b7b09..c46b69b1 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "start": "tsc -watch -p ./", "build": "tsc -p ./", "build:production": "webpack --mode production", - "clean": "git clean -xdf ./out ./.vscode-test *tsbuildinfo", + "clean": "git clean -xdf ./out ./.vscode-test", "test:vscode": "node ./out/test/jest/cli.js", "test:scripts": "jest --config jest.scripts.js", "lint": "eslint .", @@ -100,8 +100,8 @@ "ms-vscode.js-debug" ], "activationEvents": [ + "onStartupFinished", "workspaceContains:node_modules/expo", - "workspaceContains:**/node_modules/expo", "onDebug", "onDebugResolve:expo", "onDebugInitialConfigurations", diff --git a/test/fixture/.vscode/settings.json b/test/fixture/.vscode/settings.json new file mode 100644 index 00000000..e909318a --- /dev/null +++ b/test/fixture/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.openRepositoryInParentFolders": "never" +} diff --git a/test/fixture/tabs-49/.gitignore b/test/fixture/tabs-49/.gitignore new file mode 100644 index 00000000..05647d55 --- /dev/null +++ b/test/fixture/tabs-49/.gitignore @@ -0,0 +1,35 @@ +# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files + +# dependencies +node_modules/ + +# Expo +.expo/ +dist/ +web-build/ + +# Native +*.orig.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision + +# Metro +.metro-health-check* + +# debug +npm-debug.* +yarn-debug.* +yarn-error.* + +# macOS +.DS_Store +*.pem + +# local env files +.env*.local + +# typescript +*.tsbuildinfo diff --git a/test/fixture/tabs-49/app.json b/test/fixture/tabs-49/app.json new file mode 100644 index 00000000..aba8affa --- /dev/null +++ b/test/fixture/tabs-49/app.json @@ -0,0 +1,40 @@ +{ + "expo": { + "name": "tabs-49", + "slug": "tabs-49", + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/images/icon.png", + "scheme": "myapp", + "userInterfaceStyle": "automatic", + "splash": { + "image": "./assets/images/splash.png", + "resizeMode": "contain", + "backgroundColor": "#ffffff" + }, + "assetBundlePatterns": [ + "**/*" + ], + "ios": { + "supportsTablet": true + }, + "android": { + "adaptiveIcon": { + "foregroundImage": "./assets/images/adaptive-icon.png", + "backgroundColor": "#ffffff" + } + }, + "web": { + "bundler": "metro", + "output": "static", + "favicon": "./assets/images/favicon.png" + }, + "plugins": [ + "expo-router" + ], + "experiments": { + "tsconfigPaths": true, + "typedRoutes": true + } + } +} diff --git a/test/fixture/tabs-49/app/(tabs)/_layout.tsx b/test/fixture/tabs-49/app/(tabs)/_layout.tsx new file mode 100644 index 00000000..e3a1dbb3 --- /dev/null +++ b/test/fixture/tabs-49/app/(tabs)/_layout.tsx @@ -0,0 +1,55 @@ +import FontAwesome from '@expo/vector-icons/FontAwesome'; +import { Link, Tabs } from 'expo-router'; +import { Pressable, useColorScheme } from 'react-native'; + +import Colors from '~/constants/Colors'; + +/** + * You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/ + */ +function TabBarIcon(props: { + name: React.ComponentProps['name']; + color: string; +}) { + return ; +} + +export default function TabLayout() { + const colorScheme = useColorScheme(); + + return ( + + , + headerRight: () => ( + + + {({ pressed }) => ( + + )} + + + ), + }} + /> + , + }} + /> + + ); +} diff --git a/test/fixture/tabs-49/app/(tabs)/index.tsx b/test/fixture/tabs-49/app/(tabs)/index.tsx new file mode 100644 index 00000000..fd323c45 --- /dev/null +++ b/test/fixture/tabs-49/app/(tabs)/index.tsx @@ -0,0 +1,31 @@ +import { StyleSheet } from 'react-native'; + +import EditScreenInfo from '~/components/EditScreenInfo'; +import { Text, View } from '~/components/Themed'; + +export default function TabOneScreen() { + return ( + + Tab One + + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + title: { + fontSize: 20, + fontWeight: 'bold', + }, + separator: { + marginVertical: 30, + height: 1, + width: '80%', + }, +}); diff --git a/test/fixture/tabs-49/app/(tabs)/two.tsx b/test/fixture/tabs-49/app/(tabs)/two.tsx new file mode 100644 index 00000000..a03503b0 --- /dev/null +++ b/test/fixture/tabs-49/app/(tabs)/two.tsx @@ -0,0 +1,31 @@ +import { StyleSheet } from 'react-native'; + +import EditScreenInfo from '~/components/EditScreenInfo'; +import { Text, View } from '~/components/Themed'; + +export default function TabTwoScreen() { + return ( + + Tab Two + + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + title: { + fontSize: 20, + fontWeight: 'bold', + }, + separator: { + marginVertical: 30, + height: 1, + width: '80%', + }, +}); diff --git a/test/fixture/tabs-49/app/+html.tsx b/test/fixture/tabs-49/app/+html.tsx new file mode 100644 index 00000000..25524d77 --- /dev/null +++ b/test/fixture/tabs-49/app/+html.tsx @@ -0,0 +1,46 @@ +import { ScrollViewStyleReset } from 'expo-router/html'; + +// This file is web-only and used to configure the root HTML for every +// web page during static rendering. +// The contents of this function only run in Node.js environments and +// do not have access to the DOM or browser APIs. +export default function Root({ children }: { children: React.ReactNode }) { + return ( + + + + + + {/* + This viewport disables scaling which makes the mobile website act more like a native app. + However this does reduce built-in accessibility. If you want to enable scaling, use this instead: + + */} + + {/* + Disable body scrolling on web. This makes ScrollView components work closer to how they do on native. + However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line. + */} + + + {/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */} +