Skip to content

Commit

Permalink
chore: update nativewind@4.0.16
Browse files Browse the repository at this point in the history
post-install hook compiles css:
```
"eas-build-post-install": "tailwindcss -i ./global.css -o ./node_modules/.cache/nativewind/global.css.native.css"
```
  • Loading branch information
tyrauber committed Dec 16, 2023
1 parent e952973 commit 3f31683
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 25 deletions.
1 change: 1 addition & 0 deletions apps/mobile/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"expo": {
"name": "expo-monorepo",
"slug": "expo-monorepo",
"scheme": "expo-monorepo",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FontAwesome from '@expo/vector-icons/FontAwesome';
import { Link, Tabs } from 'expo-router';
import { Pressable } from 'react-native';
import { Pressable, useColorScheme } from 'react-native';

// import Colors from "@/constants/Colors";

Expand All @@ -15,7 +15,7 @@ function TabBarIcon(props: {
}

export default function TabLayout() {
//const colorScheme = useColorScheme();
const colorScheme = useColorScheme();

return (
<Tabs
Expand Down
12 changes: 5 additions & 7 deletions apps/mobile/app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import { vars } from 'nativewind';
import { Text, View } from 'react-native';
import { Pressable, Text, View } from 'react-native';

const theme = vars({
'--theme-fg': 'blue',
'--theme-fg': 'red',
});

const App = () => {
return (
<View className="flex-1 items-center justify-center" style={theme}>
<Text className="text-[16px] font-bold text-[--theme-fg] transition duration-[2s]">
Variables
</Text>
<Text className="text-base font-bold active:scale-150 active:text-[--theme-fg] transition duration-[500ms]">
<Text className="font-bold text-[--theme-fg]">Variables!</Text>
<Text className="font-bold active:scale-150 active:text-[--theme-fg] transition duration-[500ms]">
Transitions
</Text>
<Text className="text-[14px] font-bold animate-none active:animate-bounce">Animations</Text>
<Text className="font-bold animate-bounce placeholder:text-white">Animations</Text>
</View>
);
};
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import '../global.css';
import FontAwesome from '@expo/vector-icons/FontAwesome';
import { useFonts } from 'expo-font';
import { SplashScreen, Stack } from 'expo-router';
import { vars } from 'nativewind';
import { memo, useEffect } from 'react';
import { View, StyleSheet } from 'react-native';

Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"ios": "expo start --ios",
"web": "expo start --web",
"eas-build-pre-install": "npm install --global pnpm@7.x",
"eas-build-post-install": "pnpm run -w build:mobile"
"eas-build-post-install": "tailwindcss -i ./global.css -o ./node_modules/.cache/nativewind/global.css.native.css"
},
"jest": {
"preset": "jest-expo"
Expand All @@ -29,7 +29,7 @@
"expo-status-bar": "~1.6.0",
"expo-system-ui": "~2.4.0",
"expo-web-browser": "~12.3.2",
"nativewind": "4.0.0-alpha.29",
"nativewind": "4.0.16",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.72.6",
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: ['app/**/*.{js,jsx,ts,tsx}'],
content: ['app/**/*.{js,jsx,ts,tsx}', '../../packages/ui/**/*.{js,jsx,ts,tsx}'],
presets: [require('nativewind/preset')],
plugins: [],
};
29 changes: 16 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3f31683

Please sign in to comment.