项目作者: airtap

项目描述 :
Default browser provider.
高级语言: JavaScript
项目地址: git://github.com/airtap/default.git
创建时间: 2020-08-23T05:46:10Z
项目社区:https://github.com/airtap/default

开源协议:MIT License

下载


airtap-default

Default browser provider. Opens the default browser on your machine.

npm status
node
Travis build status
JavaScript Style Guide

Table of Contents

Usage

Programmatic

  1. const Default = require('airtap-default')
  2. const provider = new Default()
  3. // Get a list of desired browsers (there's just 1 here)
  4. const wanted = [{ name: 'default' }]
  5. const manifests = await provider.manifests(wanted)
  6. // Instantiate a browser
  7. const target = { url: 'http://localhost:3000' }
  8. const browser = provider.browser(manifests[0], target)
  9. await browser.open()

With Airtap

  1. providers:
  2. - airtap-default
  3. browsers:
  4. - name: default

API

Default()

Constructor. Returns an instance of browser-provider.

Install

With npm do:

  1. npm install airtap-default

License

MIT © 2020-present Airtap contributors