@edx/browserslist-config
Advanced tools
Comparing version 1.0.2 to 1.1.0
24
index.js
@@ -1,10 +0,16 @@ | ||
module.exports = [ | ||
'last 2 chrome versions', | ||
'last 2 safari versions', | ||
'last 2 edge versions', | ||
'last 2 firefox versions', | ||
// Mobile | ||
'last 2 chromeandroid versions', | ||
'last 2 firefoxandroid versions', | ||
'last 2 ios versions', | ||
const desktop = [ | ||
'last 2 Chrome major versions', | ||
'last 2 Firefox major versions', | ||
'last 2 Safari major versions', | ||
'last 2 Edge major versions', | ||
]; | ||
const mobile = [ | ||
'last 3 ChromeAndroid major versions', | ||
'last 3 FirefoxAndroid major versions', | ||
'last 3 iOS major versions', | ||
]; | ||
const supportedBrowsers = desktop.concat(mobile); | ||
module.exports = supportedBrowsers; |
{ | ||
"name": "@edx/browserslist-config", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Shared browserslist config for Open edX", | ||
@@ -18,3 +18,12 @@ "repository": { | ||
"url": "https://github.com/edx/browserslist-config/issues" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"scripts": { | ||
"supported": "node -e \"var bl = require('browserslist'); console.log(bl(require('./index')).join('\\n'));\"" | ||
}, | ||
"devDependencies": { | ||
"browserslist": "4.20.3" | ||
} | ||
} |
# `@edx/browserslist-config` | ||
[![license](https://img.shields.io/npm/l/@edx/browserslist-config)](LICENSE) | ||
[![license](https://img.shields.io/npm/l/@edx/browserslist-config)](LICENSE) [![npm](https://img.shields.io/npm/v/@edx/browserslist-config)](https://www.npmjs.com/package/@edx/browserslist-config) | ||
Shareable [browserslist](https://github.com/browserslist/browserslist) configuration for edX. See [documentation](https://github.com/browserslist/browserslist#shareable-configs) on shareable `browserslist` configurations for more details. | ||
Shareable [browserslist](https://github.com/browserslist/browserslist) configuration for Open edX. If our supported browsers changes in the future, this will be the primary place to update for all consumers (e.g., micro-frontends). | ||
## What is Browserslist? | ||
[Browserslist](https://github.com/browserslist/browserslist) is a tool to share target browsers and Node.js versions between different frontend tools (e.g., autoprefixer, babel, etc.). | ||
See [documentation](https://github.com/browserslist/browserslist#shareable-configs) on shareable `browserslist` configurations for more details. | ||
## Supported Browsers | ||
### Desktop | ||
| Browser | Version | | ||
| ----------------------------- | ------- | | ||
| Chrome | last 2 | | ||
| Chrome for Android | last 2 | | ||
| Safari | last 2 | | ||
| Safari for iOS | last 2 | | ||
| Edge | last 2 | | ||
| Firefox | last 2 | | ||
| Firefox for Android | last 2 | | ||
### Mobile | ||
| Browser | Version | | ||
| ----------------------------- | ------- | | ||
| Chrome for Android | last 3 | | ||
| Safari for iOS | last 3 | | ||
| Firefox for Android | last 3 | | ||
### List all supported browsers | ||
You can list all supported browsers by running: | ||
```shell | ||
$ npx browserslist "last 2 chrome versions, last 2 safari versions, last 2 edge versions, last 2 firefox versions, last 2 chromeandroid versions, last 2 firefoxandroid versions, last 2 ios versions" | ||
npm install | ||
npm run supported | ||
``` | ||
@@ -27,5 +43,5 @@ | ||
## Installation | ||
## Installation and usage | ||
Install the module. | ||
Install the package in your repository: | ||
@@ -36,6 +52,4 @@ ```shell | ||
## Usage | ||
In your `package.json` file: | ||
### package.json | ||
```json | ||
@@ -45,2 +59,2 @@ { | ||
} | ||
``` | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
37508
13
58
0
1
4