esoftplay 0.0.268-04cfb21 → 0.0.268-2e1c120
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/bin/build.js +17 -1
- package/package.json +1 -1
package/bin/build.js
CHANGED
|
@@ -6,6 +6,7 @@ const DIR = "../../"
|
|
|
6
6
|
const packjson = DIR + "package.json"
|
|
7
7
|
const appjson = DIR + "app.json"
|
|
8
8
|
const easjson = DIR + "eas.json"
|
|
9
|
+
const metroconfigjs = DIR + "metro.config.js"
|
|
9
10
|
const confjson = DIR + "config.json"
|
|
10
11
|
const conflivejson = DIR + "config.live.json"
|
|
11
12
|
const gitignore = DIR + ".gitignore"
|
|
@@ -40,7 +41,8 @@ if (fs.existsSync(packjson)) {
|
|
|
40
41
|
|
|
41
42
|
if (args[0] == "install") {
|
|
42
43
|
$package.scripts.start = "esp start && bunx expo start --dev-client"
|
|
43
|
-
$package.trustedDependencies
|
|
44
|
+
const existedTrustedDependencies = $package.trustedDependencies
|
|
45
|
+
const trustedDependencies = [
|
|
44
46
|
"esoftplay",
|
|
45
47
|
"esoftplay-android-print",
|
|
46
48
|
"esoftplay-chatting",
|
|
@@ -54,6 +56,7 @@ if (fs.existsSync(packjson)) {
|
|
|
54
56
|
"esoftplay-web",
|
|
55
57
|
"esoftplay-web-pwa"
|
|
56
58
|
]
|
|
59
|
+
$package.trustedDependencies = trustedDependencies.concat(existedTrustedDependencies || []).reduce((acc, item) => acc.includes(item) ? acc : [...acc, item], []);
|
|
57
60
|
writeFileSyncWithLog(packjson, JSON.stringify($package, null, 2));
|
|
58
61
|
}
|
|
59
62
|
|
|
@@ -217,6 +220,19 @@ if (fs.existsSync(packjson)) {
|
|
|
217
220
|
|
|
218
221
|
writeFileSyncWithLog(easjson, easconfg);
|
|
219
222
|
|
|
223
|
+
|
|
224
|
+
const metroConfig = `// Learn more https://docs.expo.io/guides/customizing-metro
|
|
225
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
226
|
+
const { wrapWithReanimatedMetroConfig } = require('react-native-reanimated/metro-config');
|
|
227
|
+
|
|
228
|
+
/** @type {import('expo/metro-config').MetroConfig} */
|
|
229
|
+
const config = getDefaultConfig(__dirname);
|
|
230
|
+
|
|
231
|
+
module.exports = wrapWithReanimatedMetroConfig(config);
|
|
232
|
+
`;
|
|
233
|
+
writeFileSyncWithLog(metroconfigjs, metroConfig)
|
|
234
|
+
|
|
235
|
+
|
|
220
236
|
const babelconf = `module.exports = function (api) {
|
|
221
237
|
api.cache(true);
|
|
222
238
|
let plugins = []
|