karma-webview-launcher

0.2.1 • Public • Published

karma-webview-launcher

OS WebView launcher for Karma

This plugin allows you to use a webview based app as a browser launcher. Currently it support OSX WebView (not WKWebView) only.

Installation

Install using

$ npm install karma-webview-launcher --save-dev

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    browsers: ['WebView']
  })
}

You can pass list of browsers as a CLI argument too:

$ karma start --browsers WebView

With extra options:

// karma.conf.js
module.exports = function(config) {
  config.set({
    browsers: ['WebView'],
    webviewOpts: {
      show: true/false, // or `hide: false/true`
      minimized: true/false, // only work when show is true or hide is false
      skipTaskbar: true/false, // or `showDockIcon: false/true`,
      userAgent: 'Mozilla/5.0 Version/9.0 Mobile/13A4305g', // customize the user agent
      appendUserAgent: 'Safari/601.1' // append to the default user agent, *not working with userAgent*
    }
  })
}

Run in a 'headless' like mode by make it hidden without dock icon:

// karma.conf.js
module.exports = function(config) {
  config.set({
    browsers: ['WebView'],
    webviewOpts: {
      show: false, // or `hide: true`
      skipTaskbar: true // or `showDockIcon: false`
    }
  })
}

For more information on Karma see the homepage.

Package Sidebar

Install

npm i karma-webview-launcher

Weekly Downloads

0

Version

0.2.1

License

MIT

Last publish

Collaborators

  • yyfearth