Kaynağa Gözat

added factory env

MGTKenYCS 1 yıl önce
ebeveyn
işleme
0a05a10f46
6 değiştirilmiş dosya ile 28 ekleme ve 6 silme
  1. 3 0
      .gitmodules
  2. 1 0
      app/index.tsx
  3. 9 6
      babel.config.js
  4. 1 0
      factory-env
  5. 13 0
      package-lock.json
  6. 1 0
      package.json

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "factory-env"]
+	path = factory-env
+	url = https://github.com/MGT-Limited/factory-env.git

+ 1 - 0
app/index.tsx

@@ -6,6 +6,7 @@ import BookingMenuPage from '../component/bookingMenuPage/bookingMenuPage';
 // import HomePage from '../component/homePage/homePage';
 
 export default function Index() {
+
     return (
         <View style={{ flex: 1 }}>
             {/* <Link href="/about">About</Link> */}

+ 9 - 6
babel.config.js

@@ -1,7 +1,10 @@
-module.exports = function(api) {
-  api.cache(true);
-  return {
-    presets: ['babel-preset-expo'],
-    plugins: ["nativewind/babel"],
-  };
+module.exports = function (api) {
+    api.cache(true);
+    return {
+        presets: ['babel-preset-expo'],
+        plugins: [
+            'nativewind/babel',
+            ['module:react-native-dotenv', { path: 'factory-env/.env.global' }]
+        ]
+    };
 };

+ 1 - 0
factory-env

@@ -0,0 +1 @@
+Subproject commit c9156d70250668b04566f34b2717e36f8de9e4d1

+ 13 - 0
package-lock.json

@@ -37,6 +37,7 @@
         "@babel/core": "^7.20.0",
         "@types/react": "~18.2.79",
         "@types/react-native-modern-datepicker": "^1.0.5",
+        "react-native-dotenv": "^3.4.11",
         "tailwindcss": "^3.3.2",
         "typescript": "~5.3.3"
       }
@@ -13092,6 +13093,18 @@
         }
       }
     },
+    "node_modules/react-native-dotenv": {
+      "version": "3.4.11",
+      "resolved": "https://registry.npmjs.org/react-native-dotenv/-/react-native-dotenv-3.4.11.tgz",
+      "integrity": "sha512-6vnIE+WHABSeHCaYP6l3O1BOEhWxKH6nHAdV7n/wKn/sciZ64zPPp2NUdEUf1m7g4uuzlLbjgr+6uDt89q2DOg==",
+      "dev": true,
+      "dependencies": {
+        "dotenv": "^16.4.5"
+      },
+      "peerDependencies": {
+        "@babel/runtime": "^7.20.6"
+      }
+    },
     "node_modules/react-native-element-dropdown": {
       "version": "2.12.0",
       "resolved": "https://registry.npmjs.org/react-native-element-dropdown/-/react-native-element-dropdown-2.12.0.tgz",

+ 1 - 0
package.json

@@ -38,6 +38,7 @@
     "@babel/core": "^7.20.0",
     "@types/react": "~18.2.79",
     "@types/react-native-modern-datepicker": "^1.0.5",
+    "react-native-dotenv": "^3.4.11",
     "tailwindcss": "^3.3.2",
     "typescript": "~5.3.3"
   },