INNER CODE UNIT · JavaScript

cleanupHarmonyNativeSources

reactnativecn/react-native-update · scripts/build-harmony-har.js:291

function cleanupHarmonyNativeSources() {
  fs.rmSync(harmonyNativeStageDir, { recursive: true, force: true });
}

function copyPath(sourcePath, targetPath) {
  const stats = fs.statSync(sourcePath);
  if (stats.isDirectory()) {
    fs.cpSync(sourcePath, targetPath, {
      recursive: true,
      force: true,
      filter: (entry) => path.basename(entry) !== '.git',
    });
    return;
  }

  fs.mkdirSync(path.dirname(targetPath), { recursive: true });
  fs.copyFileSync(sourcePath, targetPath);
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…