How to use @loki/target-chrome-app - 1 common examples

To help you get started, we’ve selected a few @loki/target-chrome-app examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oblador / loki / packages / renderer-aws-lambda / src / create-aws-lambda-renderer.js View on Github external
const createChromeAWSLambdaRenderer = () => async event => {
  const command = commands[event.command];
  if (!command) {
    throw serializeError(new Error(`Unknown command "${event.command}"`));
  }
  const target = createChromeAppTarget({
    baseUrl: event.baseUrl,
  });
  try {
    await target.start({
      chromeFlags: chromium.args,
      chromePath: await chromium.executablePath,
    });
    return await command(target, event);
  } catch (error) {
    throw serializeError(unwrapError(error));
  } finally {
    await target.stop();
  }
};

@loki/target-chrome-app

Loki Chrome app target

MIT
Latest version published 9 months ago

Package Health Score

65 / 100
Full package analysis

Popular @loki/target-chrome-app functions