INNER CODE UNIT · TypeScript

isAssembleInvocation

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

export function isAssembleInvocation(argv: string[]): boolean {
  return argv.some(arg => /^assemble/i.test(arg));
}

export function resolveBuildMode(
  node: HvigorNodeLike,
  taskContext: HvigorTaskContext | undefined,
  argv: string[],
): string {
  if (taskContext && typeof taskContext.getBuildMode === 'function') {
    return String(taskContext.getBuildMode());
  }
  if (typeof node.getContext === 'function') {
    for (const pluginId of MODULE_PLUGIN_IDS) {
      try {
        const context = node.getContext(pluginId);
        if (context && typeof context.getBuildMode === 'function') {
          return String(context.getBuildMode());

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…