Skip to content

Commit 5b83064

Browse files
committed
chore: update open
1 parent 83ac511 commit 5b83064

File tree

6 files changed

+43
-27
lines changed

6 files changed

+43
-27
lines changed

.github/workflows/pwa-build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
name: Publish PWA to Github Pages
22

33
on:
4+
push:
5+
branches:
6+
- main
47
workflow_dispatch:
58

69
permissions:
710
contents: write
811

912
jobs:
1013
Build:
11-
name: Publish PWA to Github Pages
14+
name: Publish Web App to Github Pages
1215
runs-on: ubuntu-latest
1316
steps:
1417

@@ -20,8 +23,8 @@ jobs:
2023
- name: 📦 Setup Bun + install deps
2124
uses: ./.github/actions/setup-bun-install
2225

23-
- name: ⚙️ Run Prebuild
24-
run: bunx tailwind -o node_modules/.cache/nativewind/global.css.web.css && bun export
26+
- name: ⚙️ Run build
27+
run: bun build:web
2528
shell: bash
2629

2730
- name: 📱 Publish web app

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Expo Local-first Template [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40expostarter)](https://twitter.com/expostarter)
22

3-
[Open in Bolt.new](https://bolt.new/~github.com/expo-starter/expo-local-first-template)
3+
[![Open in Bolt.new](https://www.expostarter.com/images/open-in-bolt-button.png)](https://bolt.new/~/github.com/expo-starter/expo-local-first-template)
44

55
<p align="center">
66
<a href="https://expostarter.com/"><img src="assets/github-banner.png?raw=true" alt="Expo Starter Kit"></a>

app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
3535
output: "static",
3636
favicon: "./assets/images/favicon.png",
3737
},
38-
plugins: [["expo-router"], ["expo-sqlite"], ["expo-font"]],
38+
plugins: ["expo-router", "expo-sqlite", "expo-font", "expo-web-browser"],
3939
experiments: {
4040
typedRoutes: true,
4141
baseUrl: "/expo-local-first-template",

app/_layout.tsx

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { NAV_THEME } from "@/lib/constants";
1212
import { useColorScheme } from "@/lib/useColorScheme";
1313
import { getItem, setItem } from "@/lib/storage";
1414
import { Platform } from "react-native";
15+
import { useFrameworkReady } from "@/hooks/useFrameworkReady";
1516

1617
const NAV_FONT_FAMILY = "Inter-Black";
1718
const LIGHT_THEME: Theme = {
@@ -75,6 +76,8 @@ export default function RootLayout() {
7576
const { colorScheme, setColorScheme } = useColorScheme();
7677
const [isColorSchemeLoaded, setIsColorSchemeLoaded] = React.useState(false);
7778

79+
useFrameworkReady();
80+
7881
React.useEffect(() => {
7982
(async () => {
8083
const theme = getItem("theme");
@@ -104,28 +107,24 @@ export default function RootLayout() {
104107
}
105108

106109
return (
107-
<>
108-
<DatabaseProvider>
109-
<ThemeProvider value={colorScheme === "dark" ? DARK_THEME : LIGHT_THEME}>
110-
<StatusBar style={colorScheme === "dark" ? "light" : "dark"} />
111-
<GestureHandlerRootView style={{ flex: 1 }}>
112-
<BottomSheetModalProvider>
113-
<Stack>
114-
<Stack.Screen name="(tabs)" options={{ title: "Habits", headerShown: false }} />
115-
<Stack.Screen options={{
116-
headerShadowVisible: false,
117-
}} name="habits/archive" />
118-
<Stack.Screen options={{
119-
headerShadowVisible: false,
120-
}} name="habits/[id]" />
121-
</Stack>
122-
</BottomSheetModalProvider>
123-
</GestureHandlerRootView>
124-
</ThemeProvider>
125-
126-
</DatabaseProvider>
110+
<DatabaseProvider>
111+
<ThemeProvider value={colorScheme === "dark" ? DARK_THEME : LIGHT_THEME}>
112+
<StatusBar style={colorScheme === "dark" ? "light" : "dark"} />
113+
<GestureHandlerRootView style={{ flex: 1 }}>
114+
<BottomSheetModalProvider>
115+
<Stack>
116+
<Stack.Screen name="(tabs)" options={{ title: "Habits", headerShown: false }} />
117+
<Stack.Screen options={{
118+
headerShadowVisible: false,
119+
}} name="habits/archive" />
120+
<Stack.Screen options={{
121+
headerShadowVisible: false,
122+
}} name="habits/[id]" />
123+
</Stack>
124+
</BottomSheetModalProvider>
125+
</GestureHandlerRootView>
126+
</ThemeProvider>
127127
<PortalHost />
128-
</>
129-
128+
</DatabaseProvider>
130129
);
131130
}

hooks/useFrameworkReady.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { useEffect } from "react";
2+
3+
declare global {
4+
interface Window {
5+
frameworkReady?: () => void;
6+
}
7+
}
8+
9+
export function useFrameworkReady() {
10+
useEffect(() => {
11+
window.frameworkReady?.();
12+
});
13+
}

0 commit comments

Comments
 (0)