react-native-update-cli 1.21.0 → 1.23.0
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/lib/bundle.js +4 -8
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/bundle.js +5 -9
package/lib/bundle.js
CHANGED
|
@@ -51,7 +51,7 @@ async function runReactNativeBundleCommand(bundleName, development, entryFile, o
|
|
|
51
51
|
if (platform === 'android') {
|
|
52
52
|
gradleConfig = await checkGradleConfig();
|
|
53
53
|
if (gradleConfig.crunchPngs !== false) {
|
|
54
|
-
console.warn('android的crunchPngs选项似乎尚未禁用(如已禁用则请忽略此提示),这可能导致热更包体积异常增大,具体请参考 https://pushy.reactnative.cn/docs/getting-started.html#%E7%A6%81%E7%94%A8-android-%E7%9A%84-crunch-%E4%BC%98%E5%8C%96 \n');
|
|
54
|
+
console.warn('android 的 crunchPngs 选项似乎尚未禁用(如已禁用则请忽略此提示),这可能导致热更包体积异常增大,具体请参考 https://pushy.reactnative.cn/docs/getting-started.html#%E7%A6%81%E7%94%A8-android-%E7%9A%84-crunch-%E4%BC%98%E5%8C%96 \n');
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -69,15 +69,11 @@ async function runReactNativeBundleCommand(bundleName, development, entryFile, o
|
|
|
69
69
|
paths: [process.cwd()]
|
|
70
70
|
});
|
|
71
71
|
try {
|
|
72
|
-
|
|
73
|
-
paths: [process.cwd()]
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
console.log(`expo-router detected, will use @expo/cli to bundle.\n`);
|
|
77
|
-
// if using expo-router, use expo-cli
|
|
72
|
+
// use expo-cli if exists
|
|
78
73
|
cliPath = require.resolve('@expo/cli', {
|
|
79
74
|
paths: [process.cwd()]
|
|
80
75
|
});
|
|
76
|
+
console.log(`expo detected, will use @expo/cli to bundle.\n`);
|
|
81
77
|
} catch (e) {}
|
|
82
78
|
const bundleCommand = cliPath.includes('@expo/cli') ? 'export:embed' : 'bundle';
|
|
83
79
|
|
|
@@ -198,7 +194,7 @@ async function pack(dir, output) {
|
|
|
198
194
|
}
|
|
199
195
|
const childs = fs.readdirSync(root);
|
|
200
196
|
for (const name of childs) {
|
|
201
|
-
if (name === '.' || name === '..') {
|
|
197
|
+
if (name === '.' || name === '..' || name === 'index.bundlejs.map') {
|
|
202
198
|
continue;
|
|
203
199
|
}
|
|
204
200
|
const fullPath = _path2.default.join(root, name);
|
package/package.json
CHANGED
package/src/.DS_Store
CHANGED
|
Binary file
|
package/src/bundle.js
CHANGED
|
@@ -33,7 +33,7 @@ async function runReactNativeBundleCommand(
|
|
|
33
33
|
gradleConfig = await checkGradleConfig();
|
|
34
34
|
if (gradleConfig.crunchPngs !== false) {
|
|
35
35
|
console.warn(
|
|
36
|
-
'android的crunchPngs选项似乎尚未禁用(如已禁用则请忽略此提示),这可能导致热更包体积异常增大,具体请参考 https://pushy.reactnative.cn/docs/getting-started.html#%E7%A6%81%E7%94%A8-android-%E7%9A%84-crunch-%E4%BC%98%E5%8C%96 \n',
|
|
36
|
+
'android 的 crunchPngs 选项似乎尚未禁用(如已禁用则请忽略此提示),这可能导致热更包体积异常增大,具体请参考 https://pushy.reactnative.cn/docs/getting-started.html#%E7%A6%81%E7%94%A8-android-%E7%9A%84-crunch-%E4%BC%98%E5%8C%96 \n',
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -55,15 +55,11 @@ async function runReactNativeBundleCommand(
|
|
|
55
55
|
paths: [process.cwd()],
|
|
56
56
|
});
|
|
57
57
|
try {
|
|
58
|
-
|
|
59
|
-
paths: [process.cwd()],
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
console.log(`expo-router detected, will use @expo/cli to bundle.\n`);
|
|
63
|
-
// if using expo-router, use expo-cli
|
|
58
|
+
// use expo-cli if exists
|
|
64
59
|
cliPath = require.resolve('@expo/cli', {
|
|
65
60
|
paths: [process.cwd()],
|
|
66
61
|
});
|
|
62
|
+
console.log(`expo detected, will use @expo/cli to bundle.\n`);
|
|
67
63
|
} catch (e) {}
|
|
68
64
|
const bundleCommand = cliPath.includes('@expo/cli')
|
|
69
65
|
? 'export:embed'
|
|
@@ -204,7 +200,7 @@ async function compileHermesByteCode(
|
|
|
204
200
|
}
|
|
205
201
|
|
|
206
202
|
const hermesCommand = `${hermesPath}/hermesc`;
|
|
207
|
-
|
|
203
|
+
|
|
208
204
|
const args = [
|
|
209
205
|
'-emit-binary',
|
|
210
206
|
'-out',
|
|
@@ -235,7 +231,7 @@ async function pack(dir, output) {
|
|
|
235
231
|
}
|
|
236
232
|
const childs = fs.readdirSync(root);
|
|
237
233
|
for (const name of childs) {
|
|
238
|
-
if (name === '.' || name === '..') {
|
|
234
|
+
if (name === '.' || name === '..' || name === 'index.bundlejs.map') {
|
|
239
235
|
continue;
|
|
240
236
|
}
|
|
241
237
|
const fullPath = path.join(root, name);
|