Skip to content

Commit

Permalink
Merge pull request #1323 from gluestack/patch
Browse files Browse the repository at this point in the history
Patch
  • Loading branch information
makkarMeenu authored Oct 20, 2023
2 parents 48cff07 + ef67545 commit 9526f53
Show file tree
Hide file tree
Showing 52 changed files with 4,777 additions and 5,402 deletions.
2 changes: 1 addition & 1 deletion _template/package-template/example/native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@babel/core": "^7.12.9",
"@expo/webpack-config": "^0.17.2",
"@types/react": "~18.0.14",
"@types/react-native": "~0.70.6",
"@types/react-native": "~0.72.3",
"babel-loader": "8.2.5",
"ts-loader": "~8.2.0",
"typescript": "^4.6.3"
Expand Down
8 changes: 4 additions & 4 deletions _template/package-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
},
"devDependencies": {
"@types/react": "^18.0.22",
"@types/react-native": "^0.69.15",
"@types/react-native": "^0.72.3",
"babel-plugin-transform-remove-console": "^6.9.4",
"react": "^18.1.0",
"react-dom": "18.1.0",
"react-native": "^0.70.3",
"react-native": "^0.72.4",
"react-native-builder-bob": "^0.20.1",
"react-native-web": "^0.18.1",
"react-native-web": "^0.19.9",
"tsconfig": "*",
"typescript": "^4.7.4"
},
"dependencies": {
"@expo/html-elements": "^0.2.2",
"@gluestack/styled": "*",
"@react-native-aria/focus": "^0.2.7",
"@react-native-aria/focus": "^0.2.9",
"lodash.merge": "^4.6.2"
},
"peerDependencies": {
Expand Down
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,17 @@ 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'),
'@gluestack-ui/config': path.join(
__dirname,
'../../packages/config/src/gliesstack-ui.config'
),
};
}
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.4"
},
"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

0 comments on commit 9526f53

Please sign in to comment.