INNER CODE UNIT · TypeScript

reactNativeUpdatePlugin

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

export function reactNativeUpdatePlugin() {
  return {
    pluginId: 'reactNativeUpdatePlugin',
    apply(node?: HvigorNodeLike) {
      const argv = process.argv;
      if (!isAssembleInvocation(argv)) {
        return;
      }
      const safeNode: HvigorNodeLike = node ?? {};
      const moduleDir = resolveModuleDir(safeNode, process.cwd());
      const projectDir = resolveProjectDir(safeNode, moduleDir);

      const writeMeta = (taskContext?: HvigorTaskContext) => {
        const buildMode = resolveBuildMode(safeNode, taskContext, argv);
        const metaFilePath = path.resolve(moduleDir, META_RELATIVE_PATH);
        fs.mkdirSync(path.dirname(metaFilePath), { recursive: true });
        const metaContent = buildMetaContent(
          buildMode,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…