How to use the screener-runner.run function in screener-runner

To help you get started, we’ve selected a few screener-runner 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 screener-io / screener-storybook / src / runner.js View on Github external
var localUrl = 'http://' + host;
      // add tunnel details
      config.tunnel = {
        host: host,
        gzip: true,
        cache: true
      };
      // generate config format expected by screener-runner
      config.states = transformToStates(config.storybook, localUrl, config.storybookPreview);
      // remove storybook-specific fields
      config = omit(config, ['storybook', 'storybookConfigDir', 'storybookStaticDir', 'storybookStaticBuildDir', 'storybookPort', 'storybookApp', 'storybookVersion', 'storybookBinPath', 'storybookPreview']);
      if (options && options.debug) {
        console.log('DEBUG: config', JSON.stringify(config, null, 2));
      }
      // send storybook states to screener-runner
      return Runner.run(config);
    });
};