Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch #1317

Merged
merged 14 commits into from
Oct 19, 2023
Merged

Patch #1317

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
35 changes: 35 additions & 0 deletions example/apps/expo-app/.gitignore
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions example/apps/expo-app/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import { SafeAreaView } from 'react-native';
import {
GluestackUIProvider,
Button,
ButtonText,
Center,
} from '@gluestack-ui/themed';
import { config } from '@gluestack-ui/config';
export default function App() {
return (
<SafeAreaView
// eslint-disable-next-line react-native/no-inline-styles
style={{
flex: 1,
}}
>
<GluestackUIProvider config={config}>
<Center flex={1}>
<Button>
<ButtonText>Hello</ButtonText>
</Button>
</Center>
</GluestackUIProvider>
</SafeAreaView>
);
}
11 changes: 3 additions & 8 deletions example/expo-project/app.json → example/apps/expo-app/app.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"expo": {
"name": "expo-project",
"slug": "expo-project",
"name": "expo-app",
"slug": "expo-app",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
Expand All @@ -17,12 +15,9 @@
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
"web": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ module.exports = function (api) {
? [
'module-resolver',
{
alias: getAliases(),
alias: {
'@gluestack-ui/themed': path.join(
__dirname,
'../../../packages/themed/src'
),
'@gluestack-ui/config': path.join(
__dirname,
'../../../packages/config/src/gluestack-ui.config'
),
},
},
]
: [
Expand All @@ -17,12 +26,7 @@ module.exports = function (api) {
exclude: 'node_modules',
},
],
'@babel/plugin-transform-modules-commonjs',
],
};
};
function getAliases() {
return {
// For development, we want to alias the library to the source
'@gluestack-ui/themed': path.join(__dirname, '../../packages/themed/src'),
};
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Learn more https://docs.expo.dev/guides/monorepos
const { getDefaultConfig } = require('expo/metro-config');
const path = require('path');

// Find the project and workspace directories
const projectRoot = __dirname;
// This can be replaced with `find-yarn-workspace-root`
const workspaceRoot = path.resolve(projectRoot, '../..');
const workspaceRoot = path.resolve(projectRoot, '../../..');

const config = getDefaultConfig(projectRoot);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "expo-project",
"name": "expo-app",
"version": "1.0.0",
"main": "index.js",
"scripts": {
Expand All @@ -9,15 +9,13 @@
"web": "expo start --web"
},
"dependencies": {
"expo": "~48.0.6",
"expo-status-bar": "~1.4.4",
"expo": "~49.0.13",
"expo-status-bar": "~1.6.0",
"react": "18.2.0",
"react-native": "^0.71.7"
"react-native": "0.72.5"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/react": "~18.0.14",
"typescript": "4.9.4"
"@babel/core": "^7.20.0"
},
"private": true
}
11 changes: 11 additions & 0 deletions example/apps/expo-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"paths": {
"@gluestack-ui/config": [
"../../../packages/config/src/gluestack-ui.config"
],
"@gluestack-ui/themed": ["../../../packages/themed/src"]
}
},
"extends": "expo/tsconfig.base"
}
17 changes: 0 additions & 17 deletions example/expo-project/.gitignore

This file was deleted.

73 changes: 0 additions & 73 deletions example/expo-project/App.tsx

This file was deleted.

Loading