INNER CODE UNIT · TypeScript

saveFileAsync

bamlab/react-native-flipper-performance-monitor · flipper-native/plugin/src/index.ts:72

async function saveFileAsync(path: string, content: string) {
  return fs.promises.writeFile(path, content, "utf8");
}

function getDebugRoot(projectRoot: string) {
  return path.join(projectRoot, "android", "app", "src", "debug", "java");
}

async function addReactNativePerformancePluginForExpoAndroid(
  config: ExportedConfigWithProps
) {
  if (config.android) {
    const projectRoot = config.modRequest.projectRoot;
    const packageDebugRoot = getDebugRoot(projectRoot);
    const packageName = config.android.package || "";
    const reactNativeFlipperFilePath = path.join(
      packageDebugRoot,
      `${packageName.split(".").join("/")}/ReactNativeFlipper.java`

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…