Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/divio/browserslist-saucelabs
Browserslist to Sauce Labs capabilities converter
https://github.com/divio/browserslist-saucelabs
Last synced: 2 months ago
JSON representation
Browserslist to Sauce Labs capabilities converter
- Host: GitHub
- URL: https://github.com/divio/browserslist-saucelabs
- Owner: divio
- License: mit
- Created: 2015-07-05T09:35:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-01T12:50:31.000Z (over 8 years ago)
- Last Synced: 2024-08-10T04:58:59.450Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 67.4 KB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Browserslist Saucelabs
======================[![Build Status](https://travis-ci.org/divio/browserslist-saucelabs.svg?branch=master)](https://travis-ci.org/divio/browserslist-saucelabs)
Converter from browserslist to saucelabs desired capabilities.
Very opinionated, in some places also very silly.Not every browser that browserslist outputs is present on SauceLabs.
Under the hood uses amazing [Browserslist](https://github.com/ai/browserslist) library.
## Usage
```js
var b2s = require('browserslist-saucelabs');b2s({ browsers: ['last 2 versions'] });
```Result would be
```
[
{ browserName: 'Chrome', platform: 'OS X 10.6', version: '43' },
{ browserName: 'Chrome', platform: 'OS X 10.6', version: '42' },
{ browserName: 'Firefox', platform: 'OS X 10.6', version: '38' },
{ browserName: 'Internet Explorer', platform: 'Windows 8.1', version: '11' },
{ browserName: 'Internet Explorer', platform: 'Windows 8', version: '10' },
{ browserName: 'iPhone', platform: 'OS X 10.10', version: '8.1', deviceName: 'iPhone Simulator' },
{ browserName: 'Safari', platform: 'OS X 10.10', version: '8' }
]
```Or if you want to test your stuff _thoroughly_
```js
var b2s = require('browserslist-saucelabs');b2s({ browsers: ['last 2 versions'], allPlatforms: true });
```Result would be
```
[
{ browserName: 'Chrome', platform: 'OS X 10.6', version: '43' },
{ browserName: 'Chrome', platform: 'OS X 10.9', version: '43' },
{ browserName: 'Chrome', platform: 'Windows XP', version: '43' },
{ browserName: 'Chrome', platform: 'OS X 10.8', version: '43' },
{ browserName: 'Chrome', platform: 'Windows 8', version: '43' },
{ browserName: 'Chrome', platform: 'Linux', version: '43' },
{ browserName: 'Chrome', platform: 'Windows 8.1', version: '43' },
{ browserName: 'Chrome', platform: 'Windows 7', version: '43' },
{ browserName: 'Chrome', platform: 'OS X 10.10', version: '43' },
{ browserName: 'Chrome', platform: 'OS X 10.6', version: '42' },
{ browserName: 'Chrome', platform: 'OS X 10.9', version: '42' },
{ browserName: 'Chrome', platform: 'Windows XP', version: '42' },
{ browserName: 'Chrome', platform: 'OS X 10.8', version: '42' },
{ browserName: 'Chrome', platform: 'Windows 8', version: '42' },
{ browserName: 'Chrome', platform: 'Linux', version: '42' },
{ browserName: 'Chrome', platform: 'Windows 8.1', version: '42' },
{ browserName: 'Chrome', platform: 'Windows 7', version: '42' },
{ browserName: 'Chrome', platform: 'OS X 10.10', version: '42' },
{ browserName: 'Firefox', platform: 'OS X 10.6', version: '38' },
{ browserName: 'Firefox', platform: 'OS X 10.9', version: '38' },
{ browserName: 'Firefox', platform: 'Windows XP', version: '38' },
{ browserName: 'Firefox', platform: 'Windows 8', version: '38' },
{ browserName: 'Firefox', platform: 'Linux', version: '38' },
{ browserName: 'Firefox', platform: 'Windows 8.1', version: '38' },
{ browserName: 'Firefox', platform: 'Windows 7', version: '38' },
{ browserName: 'Firefox', platform: 'OS X 10.10', version: '38' },
{ browserName: 'Internet Explorer', platform: 'Windows 8.1', version: '11' },
{ browserName: 'Internet Explorer', platform: 'Windows 7', version: '11' },
{ browserName: 'Internet Explorer', platform: 'Windows 8', version: '10' },
{ browserName: 'Internet Explorer', platform: 'Windows 7', version: '10' },
{ browserName: 'iPhone', platform: 'OS X 10.10', version: '8.1', deviceName: 'iPhone Simulator' },
{ browserName: 'iPad', platform: 'OS X 10.10', version: '8.1', deviceName: 'iPad Simulator' },
{ browserName: 'Safari', platform: 'OS X 10.10', version: '8' }
]
```I'm not even talking about android, there's ton of them available.
It also picks up `browserslist` file, so you don't have to pass an array of browsers.