mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-19 18:13:46 +08:00
stop the packager from running
This commit is contained in:
@@ -34,7 +34,7 @@ var tsCompileOptions = {
|
||||
};
|
||||
|
||||
function spawnCommand(command, args, callback, silent, detached) {
|
||||
var options = {};
|
||||
var options = { maxBuffer: 1024 * 1024 };
|
||||
if (detached) {
|
||||
options.detached = true;
|
||||
options.stdio = ["ignore"];
|
||||
@@ -55,7 +55,7 @@ function spawnCommand(command, args, callback, silent, detached) {
|
||||
};
|
||||
|
||||
function execCommand(command, args, callback, silent) {
|
||||
var execProcess = child_process.exec(command + " " + args.join(" "));
|
||||
var execProcess = child_process.exec(command + " " + args.join(" "), { maxBuffer: 1024 * 1024 });
|
||||
|
||||
if (!silent) execProcess.stdout.pipe(process.stdout);
|
||||
if (!silent) execProcess.stderr.pipe(process.stderr);
|
||||
|
||||
4
test/template/ios/launchPackager.command
Executable file
4
test/template/ios/launchPackager.command
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This file replaces the file that starts the packager during iOS builds and prevents it from starting.
|
||||
# It belongs in node_modules/react-native/packager
|
||||
@@ -193,6 +193,10 @@ class RNIOS extends Platform.IOS implements RNPlatform {
|
||||
// Fix the linker flag list in project.pbxproj (pod install adds an extra comma)
|
||||
.then(TestUtil.replaceString.bind(undefined, path.join(iOSProject, TestConfig.TestAppName + ".xcodeproj", "project.pbxproj"),
|
||||
"\"[$][(]inherited[)]\",\\s*[)];", "\"$(inherited)\"\n\t\t\t\t);"))
|
||||
// Prevent the packager from starting during builds by replacing the script that starts it with a file that does nothing.
|
||||
.then(TestUtil.copyFile.bind(undefined,
|
||||
path.join(TestConfig.templatePath, "ios", "launchPackager.command"),
|
||||
path.join(projectDirectory, TestConfig.TestAppName, "node_modules", "react-native", "packager", "launchPackager.command"), true))
|
||||
// Copy the AppDelegate.m to the project
|
||||
.then(TestUtil.copyFile.bind(undefined,
|
||||
path.join(TestConfig.templatePath, "ios", TestConfig.TestAppName, "AppDelegate.m"),
|
||||
|
||||
Reference in New Issue
Block a user