diff --git a/Makefile b/Makefile index aa3e5e2..b35bffb 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,12 @@ svelte: svelte/dist/* cleanSvelte: rm -rf ./svelte/dist +reactNative/dist/*: ./reactNative/* + cd reactNative && npm install && npm run export +reactNative: reactNative/dist/* +cleanReactNative: + rm -rf ./reactNative/dist + cleandist: rm -rf dist dist: @@ -45,9 +51,12 @@ dist/svelte: dist svelte/dist/* dist/index.html: dist index.tmpl go run server.go generate mv index.html dist/ +dist/reactNative: dist reactNative/dist/* + rm -rf ./dist/reactNative && \ + cp -r ./reactNative/dist ./dist/reactNative -export: dist/vanillaJS dist/react dist/alpinejs dist/reactNextJS dist/assets dist/vuejs dist/svelte dist/index.html -web: ./svelte/dist/* ./vuejs/dist/* ./reactNextJS/out/* vanillaJS/index.html react/index.html alpinejs/index.html +export: dist/vanillaJS dist/react dist/alpinejs dist/reactNextJS dist/vuejs dist/svelte dist/index.html dist/reactNative +web: ./reactNative/dist/* ./svelte/dist/* ./vuejs/dist/* ./reactNextJS/out/* vanillaJS/index.html react/index.html alpinejs/index.html build: web server.go go build server.go run: web server.go diff --git a/reactNative/.gitignore b/reactNative/.gitignore new file mode 100644 index 0000000..6623142 --- /dev/null +++ b/reactNative/.gitignore @@ -0,0 +1,20 @@ +node_modules/ +.expo/ +dist/ +npm-debug.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision +*.orig.* +web-build/ + +# macOS +.DS_Store + +# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb +# The following patterns were generated by expo-cli + +expo-env.d.ts +# @end expo-cli \ No newline at end of file diff --git a/reactNative/README.md b/reactNative/README.md new file mode 100644 index 0000000..cd4feb8 --- /dev/null +++ b/reactNative/README.md @@ -0,0 +1,50 @@ +# Welcome to your Expo app 👋 + +This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). + +## Get started + +1. Install dependencies + + ```bash + npm install + ``` + +2. Start the app + + ```bash + npx expo start + ``` + +In the output, you'll find options to open the app in a + +- [development build](https://docs.expo.dev/develop/development-builds/introduction/) +- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/) +- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/) +- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo + +You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction). + +## Get a fresh project + +When you're ready, run: + +```bash +npm run reset-project +``` + +This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing. + +## Learn more + +To learn more about developing your project with Expo, look at the following resources: + +- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides). +- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web. + +## Join the community + +Join our community of developers creating universal apps. + +- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute. +- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions. diff --git a/reactNative/app.json b/reactNative/app.json new file mode 100644 index 0000000..5dea2b0 --- /dev/null +++ b/reactNative/app.json @@ -0,0 +1,37 @@ +{ + "expo": { + "name": "reactNativeApp", + "slug": "reactNativeApp", + "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" + }, + "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": { + "typedRoutes": true, + "baseUrl": "/reactNative" + } + } +} diff --git a/reactNative/app/_layout.tsx b/reactNative/app/_layout.tsx new file mode 100644 index 0000000..0ccea09 --- /dev/null +++ b/reactNative/app/_layout.tsx @@ -0,0 +1,9 @@ +import { Stack } from "expo-router"; + +export default function RootLayout() { + return ( + + + + ); +} diff --git a/reactNative/app/index.tsx b/reactNative/app/index.tsx new file mode 100644 index 0000000..4bef570 --- /dev/null +++ b/reactNative/app/index.tsx @@ -0,0 +1,33 @@ +import { Text, View, Button } from "react-native"; +import React, {useState} from 'react'; +import { ThemedText } from "@/components/ThemedText" +import Blurb, {BlurbData} from "@/components/Blurb" + +const default_blurb: BlurbData = { + title: "Fart Man Comes To Town!", + blurb: "Will this controversial figure finally cause the downfall of the town? Sally Smith from town center says that she can already smell trouble brewing but other members of the town believe the imminent winds of change will revitalize the towns central business district." +}; + +export default function Index() { + const [blurbs, setBlurbs] = useState([default_blurb]) + return ( + + {blurbs.map((blurb, i) => ( + + ))} +