Skip to content

Commit

Permalink
initial commit, basic react native typescript expo template
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayLiu committed May 13, 2023
0 parents commit ee4e490
Show file tree
Hide file tree
Showing 11 changed files with 259 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
https://console.firebase.google.com/project/verde-app/settings/general
FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
FIREBASE_MESSAGING_SENDER_ID=
FIREBASE_APP_ID=
FIREBASE_MEASUREMENT_ID=
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
],
overrides: [],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["react", "@typescript-eslint", "react-hooks", "prettier"],
rules: {
"prettier/prettier": ["warn", { endOfLine: "auto" }],
"react/react-in-jsx-scope": "off",
},
};
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
node_modules/
yarn-error.log
.expo/
dist/
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
.env

# macOS
.DS_Store
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
singleQuote: false,
trailingComma: "all",
useTabs: true,
tabWidth: 4,
};
6 changes: 6 additions & 0 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React, { useState } from "react";
import "@config/firebase";

export default function App() {
return;
}
42 changes: 42 additions & 0 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import "dotenv/config";

export default {
expo: {
name: "verde",
slug: "verde",
version: "1.0.0",
orientation: "portrait",
icon: "./src/assets/icon.png",
splash: {
image: "./src/assets/splash.png",
resizeMode: "contain",
backgroundColor: "#ffffff",
},
updates: {
fallbackToCacheTimeout: 0,
},
assetBundlePatterns: ["**/*"],
ios: {
supportsTablet: true,
bundleIdentifier: "com.graticat.graticat",
},
android: {
adaptiveIcon: {
foregroundImage: "./src/assets/adaptive-icon.png",
backgroundColor: "#FFFFFF",
},
},
web: {
favicon: "./src/assets/favicon.png",
},
extra: {
firebaseApiKey: process.env.FIREBASE_API_KEY,
firebaseAuthDomain: process.env.FIREBASE_AUTH_DOMAIN,
firebaseProjectId: process.env.FIREBASE_PROJECT_ID,
firebaseStorageBucket: process.env.FIREBASE_STORAGE_BUCKET,
firebaseMessagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,
firebaseAppId: process.env.FIREBASE_APP_ID,
eas: {},
},
},
};
34 changes: 34 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = function (api) {
api.cache(true);
const plugins = [
[
"module-resolver",
{
root: ["./src/"],
extensions: [
".ios.js",
".android.js",
".js",
".ts",
".tsx",
".json",
],
alias: {
tests: ["./tests/"],
"@assets": "./src/assets/",
"@components": "./src/components",
"@config": "./src/config",
"@navigation": "./src/navigation",
"@screens": "./src/screens",
"@utils": "./src/utils",
"@hooks": "./src/utils/hooks",
"@styles": "./src/styles",
},
},
],
];
return {
presets: ["babel-preset-expo"],
plugins,
};
};
29 changes: 29 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"cli": {
"version": ">= 3.5.2"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium"
}
},
"preview": {
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium",
"simulator": true
}
},
"production": {
"ios": {
"resourceClass": "m1-medium"
}
}
},
"submit": {
"production": {}
}
}
7 changes: 7 additions & 0 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require("@expo/metro-config"); // eslint-disable-line

const defaultConfig = getDefaultConfig(__dirname);
defaultConfig.resolver.assetExts.push("cjs");

module.exports = defaultConfig;
72 changes: 72 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name": "graticat",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"lint": "eslint .",
"format": "prettier --check ."
},
"dependencies": {
"@expo-google-fonts/heebo": "^0.2.3",
"@expo-google-fonts/playfair-display": "^0.2.3",
"@react-native-async-storage/async-storage": "^1.17.11",
"@react-native-material/core": "^1.3.7",
"@react-navigation/native": "^6.1.1",
"@react-navigation/stack": "^6.3.9",
"dotenv": "^16.0.3",
"expo": "~47.0.8",
"expo-app-loading": "~2.1.1",
"expo-asset": "~8.7.0",
"expo-camera": "^13.1.0",
"expo-constants": "~14.0.2",
"expo-font": "~11.0.1",
"expo-haptics": "~12.0.1",
"expo-image-manipulator": "^11.0.0",
"expo-image-picker": "~14.0.2",
"expo-status-bar": "~1.4.2",
"firebase": "^9.15.0",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-native": "0.70.5",
"react-native-calendars": "^1.1293.0",
"react-native-confetti-cannon": "^1.5.2",
"react-native-elements": "^3.4.2",
"react-native-gesture-handler": "~2.8.0",
"react-native-haptic-feedback": "^1.14.0",
"react-native-ionicons": "^4.6.5",
"react-native-modal": "^13.0.1",
"react-native-pager-view": "6.0.1",
"react-native-progress": "^5.0.0",
"react-native-safe-area-context": "4.4.1",
"react-native-screens-swiper": "^1.2.6",
"react-native-settings-components": "^0.0.2",
"react-native-settings-list": "^1.8.0",
"react-native-settings-screen": "^2.2.1",
"react-native-svg": "13.4.0",
"react-native-swipe-navigation": "^1.0.0-beta",
"react-native-swiper": "^1.6.0",
"react-native-tab-view": "^3.3.4",
"react-native-uuid": "^2.0.1",
"react-native-web": "~0.18.9",
"tunnel": "^0.0.6"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@types/react": "~18.0.14",
"@types/react-native": "~0.70.6",
"@typescript-eslint/eslint-plugin": "^5.46.0",
"@typescript-eslint/parser": "^5.46.0",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "^8.29.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.8.1",
"typescript": "^4.6.3"
},
"private": true
}
17 changes: 17 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"baseUrl": ".",
"paths": {
"@assets/*": ["src/assets/*"],
"@components/*": ["src/components/*"],
"@config/*": ["src/config/*"],
"@navigation/*": ["src/navigation/*"],
"@screens/*": ["src/screens/*"],
"@utils/*": ["src/utils/*"],
"@hooks/*": ["src/utils/hooks/*"],
"@styles/*": ["src/styles/*"],
},
}
}

0 comments on commit ee4e490

Please sign in to comment.