INNER CODE UNIT · TypeScript

resolveProjectDir

reactnativecn/react-native-update · harmony/hvigor-plugin.ts:99

export function resolveProjectDir(
  node: HvigorNodeLike,
  moduleDir: string,
): string {
  const parent =
    typeof node.getParentNode === 'function' ? node.getParentNode() : undefined;
  if (parent && typeof parent.getNodePath === 'function') {
    const parentPath = parent.getNodePath();
    if (parentPath) {
      return parentPath;
    }
  }
  return path.dirname(moduleDir);
}

// Debug builds get "0" like Android's `pushy_build_time` resValue: a debug
// rebuild must not look like a new binary and reset the update state.
export function buildMetaContent(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…