code: function getBuildFactory(build) {
    return function createBuild(inputpath, outputname) {
      const input = path.relative(process.cwd(), inputpath);
      let parent = build;
  
      if (!parent.builds.some(build => build.input == input)) {
        const outputpath = path.join(path.dirname(parent.outputpaths[0]), outputname);
        const buildConfig = {
          batch: parent.batch,
          boilerplate: false,
          bootstrap: false,
          browser: parent.browser,
          bundle: parent.bundle,
          fileCache: parent.fileCache,
          index: ++numBuilds,
          input,
          inputpaths: [inputpath],
          isAppServer: false,
          isDynamicBuild: true,
          label: '',
          level: parent.level + 1,
          output: path.relative(process.cwd(), path.dirname(outputpath)),
          outputpaths: [outputpath],
          parent,
          resolverCache: parent.resolverCache,
          runtimeOptions: parent.runtimeOptions,
          type: parent.type,
          watchOnly: parent.watchOnly
        };
        const build = buildFactory(buildConfig);
  
        build.fileFactoryOptions = getFileFactoryOptions(
          build,
          parent,
          null,
          null,
          Object.assign({}, parent.fileFactoryOptions)
        );
        build.fileFactory = build.fileFactoryOptions.fileFactory;
        parent.builds.push(build);
        parent.childInputpaths.push(inputpath);
      }
  
      // Find root build
      while (parent.parent)
        parent = parent.parent;
      parent.processFilesOptions.importBoilerplate = true;
    };
  }
docs: Retrieve build factory for 'build'
  @param {Object} build
  @returns {Function}