@hoddy-ui/core 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/core",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -11,9 +11,6 @@
11
11
  "author": "Hoddy inc",
12
12
  "license": "MIT",
13
13
  "private": false,
14
- "scripts": {
15
- "postinstall": "node -r ts-node/register -e \"require('./config/index').loadConfig()\""
16
- },
17
14
  "peerDependencies": {
18
15
  "@expo/vector-icons": "^13.0.0",
19
16
  "@react-native-async-storage/async-storage": "^1.18.1",
@@ -1,4 +1,4 @@
1
- import * as fs from "fs";
1
+ // import * as fs from "fs";
2
2
  import { setApiKey } from "./KeyManager";
3
3
 
4
4
  type configProps = {
@@ -13,10 +13,8 @@ type configProps = {
13
13
  };
14
14
  };
15
15
 
16
- export function loadConfig(): void {
16
+ export function initialize(config: configProps): void {
17
17
  try {
18
- const configData = fs.readFileSync("./hui-config.json", "utf-8");
19
- const config: configProps = JSON.parse(configData);
20
18
  setApiKey({
21
19
  GOOGLE_MAP_API_KEY: config.googleMapApiKey,
22
20
  });
@@ -26,3 +24,16 @@ export function loadConfig(): void {
26
24
  console.error("Error reading the config file:", error);
27
25
  }
28
26
  }
27
+ // export function loadConfig(): void {
28
+ // try {
29
+ // const configData = fs.readFileSync("./hui-config.json", "utf-8");
30
+ // const config: configProps = JSON.parse(configData);
31
+ // setApiKey({
32
+ // GOOGLE_MAP_API_KEY: config.googleMapApiKey,
33
+ // });
34
+
35
+ // console.log("Got key from frontend", config.googleMapApiKey);
36
+ // } catch (error) {
37
+ // console.error("Error reading the config file:", error);
38
+ // }
39
+ // }