stop the packager from running

This commit is contained in:
scottbommarito
2016-06-03 10:49:06 -07:00
parent fd2820a2c9
commit 08708131cc
3 changed files with 10 additions and 2 deletions

View 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

View File

@@ -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"),