Example #1
0
export async function getPundle({
  config: configInline = {},
  configFilePath = CONFIG_FILE_NAME,
  configLoadFile = true,
  directory = process.cwd(),
}: { config?: Object, configFilePath?: string, configLoadFile?: boolean, directory?: string } = {}) {
  const context: Context = new Context({
    config: ({}: Object),
    configInline,
    configFilePath,
    configLoadFile,
    directory,
  })
  context.config = await loadConfig(context)
  const master = new Master(context)
  return master
}
Example #2
0
export async function getPundleConfig({
  configFilePath = CONFIG_FILE_NAME,
  configLoadFile = true,
  directory = process.cwd(),
}: {
  configFilePath?: string,
  configLoadFile?: boolean,
  directory?: string,
}): Promise<Config> {
  const context: Context = new Context({
    config: ({}: Object),
    configInline: {},
    configFilePath,
    configLoadFile,
    directory,
  })
  return loadConfig(context)
}