codingpixel-expo-app 0.1.5 → 0.1.6
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/dist/scaffold.js
CHANGED
|
@@ -31,13 +31,25 @@ export async function runCreateExpoApp(dir, _name) {
|
|
|
31
31
|
], { stdio: "inherit" });
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* Delete
|
|
35
|
-
*
|
|
34
|
+
* Delete blank-typescript leftovers that conflict with our expo-router setup:
|
|
35
|
+
*
|
|
36
|
+
* - `App.tsx` — root component for non-expo-router apps; collides with
|
|
37
|
+
* expo-router's auto-detection of `src/app/`.
|
|
38
|
+
* - `index.ts` — root entry shipped by blank-typescript: imports `./App`
|
|
39
|
+
* and calls `registerRootComponent`. We set `package.json#main` to
|
|
40
|
+
* `expo-router/entry` so this file is unused at runtime, but TypeScript
|
|
41
|
+
* still type-checks it and errors with `Cannot find module './App'`
|
|
42
|
+
* after we delete the file above.
|
|
43
|
+
*
|
|
44
|
+
* Idempotent (no-op if already absent).
|
|
36
45
|
*/
|
|
37
46
|
export function cleanupBlankTemplate(target) {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
47
|
+
const removable = ["App.tsx", "index.ts"];
|
|
48
|
+
for (const rel of removable) {
|
|
49
|
+
const p = path.join(target, rel);
|
|
50
|
+
if (fileExists(p)) {
|
|
51
|
+
fs.rmSync(p);
|
|
52
|
+
log.step(`Removed blank-typescript ${rel} (replaced by expo-router src/app/).`);
|
|
53
|
+
}
|
|
42
54
|
}
|
|
43
55
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// react-native-mmkv
|
|
2
|
-
//
|
|
3
|
-
import {
|
|
1
|
+
// react-native-mmkv 4.x exports `createMMKV()` factory + `MMKV` as a TYPE only.
|
|
2
|
+
// (Earlier 3.x exported `MMKV` as a class; the API was reverted in 4.x.)
|
|
3
|
+
import { createMMKV } from "react-native-mmkv";
|
|
4
4
|
|
|
5
|
-
const storage =
|
|
5
|
+
const storage = createMMKV();
|
|
6
6
|
|
|
7
7
|
export const reduxStorage = {
|
|
8
8
|
setItem: (key: string, value: string) => {
|
|
@@ -14,7 +14,7 @@ export const reduxStorage = {
|
|
|
14
14
|
return Promise.resolve(value);
|
|
15
15
|
},
|
|
16
16
|
removeItem: (key: string) => {
|
|
17
|
-
storage.
|
|
17
|
+
storage.remove(key);
|
|
18
18
|
return Promise.resolve();
|
|
19
19
|
},
|
|
20
20
|
};
|