Skip to content

Commit

Permalink
Merge pull request #120 from Polymer/import-browser-capabilities
Browse files Browse the repository at this point in the history
import browser-capabilities to monorepo
  • Loading branch information
aomarks authored Apr 12, 2018
2 parents 884b06f + 9096976 commit 08d5b54
Show file tree
Hide file tree
Showing 14 changed files with 2,370 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/browser-capabilities/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
BasedOnStyle: Google
AlignAfterOpenBracket: AlwaysBreak
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
2 changes: 2 additions & 0 deletions packages/browser-capabilities/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
lib/
6 changes: 6 additions & 0 deletions packages/browser-capabilities/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/
test/

.clang-format
.travis.yml
tsconfig.json
6 changes: 6 additions & 0 deletions packages/browser-capabilities/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- "6"
- "node"
script:
- npm test
18 changes: 18 additions & 0 deletions packages/browser-capabilities/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Change Log

## [Unreleased]

## [0.2.2] - 2018-01-01
- Add Chrome Headless browser.

## [0.2.1] - 2017-10-18
- Remove Firefox from set of browsers with push capability due to https://bugzilla.mozilla.org/show_bug.cgi?id=1409570.

## [0.2.0] - 2017-08-09
- Add JavaScript modules capability.

## [0.1.1] - 2017-08-08
- Declare TypeScript typings.

## [0.1.0] - 2017-08-08
- Initial release. Factored out of https://github.com/Polymer/prpl-server-node/blob/master/src/capabilities.ts
5 changes: 5 additions & 0 deletions packages/browser-capabilities/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
17 changes: 17 additions & 0 deletions packages/browser-capabilities/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[![Travis Build Status](https://travis-ci.org/Polymer/browser-capabilities.svg?branch=master)](https://travis-ci.org/Polymer/browser-capabilities)
[![Build status](https://ci.appveyor.com/api/projects/status/gn1iuc8qgx8l86yf?svg=true)](https://ci.appveyor.com/project/aomarks/browser-capabilities)
[![NPM version](http://img.shields.io/npm/v/browser-capabilities.svg)](https://www.npmjs.com/package/browser-capabilities)

# browser-capabilities

A JavaScript library that detects browser capabilities from a user agent string.

The following keywords are supported. See [browser-capabilities.ts](https://github.com/Polymer/browser-capabilities/blob/master/src/browser-capabilities.ts) for the latest browser support matrix.

| Keyword | Description
| :---- | :----
| es2015 | [ECMAScript 2015 (aka ES6)](https://developers.google.com/web/shows/ttt/series-2/es2015)
| push | [HTTP/2 Server Push](https://developers.google.com/web/fundamentals/performance/http2/#server-push)
| serviceworker | [Service Worker API](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers)
| modules | [JavaScript Modules](https://www.chromestatus.com/feature/5365692190687232)

18 changes: 18 additions & 0 deletions packages/browser-capabilities/appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
environment:
matrix:
- nodejs_version: "6"
- nodejs_version: ""

cache:
- "%LOCALAPPDATA%\\Yarn"

install:
- ps: Install-Product node $env:nodejs_version
- yarn install

test_script:
- node --version
- yarn --version
- yarn test

build: off
Loading

0 comments on commit 08d5b54

Please sign in to comment.