@ivuorinen/browserslist-config 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Ismo Vuorinen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # @ivuorinen/browserslist-config <!-- omit in toc -->
2
+
3
+ [![npm package][npm-badge]][npm-link] [![license MIT][license-badge]][license-link] [![ivuorinen's Code Style][style-badge]][style-link]
4
+
5
+ > ivuorinen's shareable configuration for [`Browserslist`][browserslist-link].
6
+
7
+ ## Table of Contents <!-- omit in toc -->
8
+
9
+ - [Supported Browsers](#supported-browsers)
10
+ - [Desktop Browsers](#desktop-browsers)
11
+ - [Mobile Browsers](#mobile-browsers)
12
+ - [Installation](#installation)
13
+ - [Documentations](#documentations)
14
+ - [Contributing](#contributing)
15
+ - [Changelog](#changelog)
16
+ - [License](#license)
17
+
18
+ ## Supported Browsers
19
+
20
+ ### Desktop Browsers
21
+
22
+ | [![Chrome][chrome-image]][browsers-badges-link] | [![Edge][edge-image]][browsers-badges-link] | [![Firefox][firefox-image]][browsers-badges-link] | [![Opera][opera-image]][browsers-badges-link] | [![Safari][safari-image]][browsers-badges-link] |
23
+ | :---------------------------------------------: | :-----------------------------------------: | :-----------------------------------------------: | :-------------------------------------------: | :---------------------------------------------: |
24
+ | Chrome | Edge | Firefox | Opera | Safari |
25
+ | >= 60 | last 2 | >= 60 | last 2 | >= 12 |
26
+
27
+ ### Mobile Browsers
28
+
29
+ | [![Android WebView][android-webview-image]][browsers-badges-link] | [![Chrome][chrome-image]][browsers-badges-link] | [![Firefox][firefox-image]][browsers-badges-link] | [![Opera Mini][opera-mini-image]][browsers-badges-link] | [![Safari iOS][safari-ios-image]][browsers-badges-link] | [![Samsung Internet][samsung-internet-image]][browsers-badges-link] | [![UC][uc-image]][browsers-badges-link] |
30
+ | :---------------------------------------------------------------: | :---------------------------------------------: | :-----------------------------------------------: | :-----------------------------------------------------: | :-----------------------------------------------------: | :-----------------------------------------------------------------: | :-------------------------------------: |
31
+ | Android WebView | Chrome | Firefox | Opera Mini | Safari iOS | Samsung Internet | UC |
32
+ | last 2 | last 2 | last 2 | last 2 | >= 12 | last 2 | last 2 |
33
+
34
+ ## Installation
35
+
36
+ Install `this config` as a _`devDependencies`_:
37
+
38
+ ```sh
39
+ # npm
40
+ npm install @ivuorinen/browserslist-config --save-dev
41
+
42
+ # Yarn
43
+ yarn add @ivuorinen/browserslist-config --dev
44
+ ```
45
+
46
+ After installing it, a _`.browserslistrc`_ file will be created automatically in the project's root folder with the following configuration:
47
+
48
+ ```json
49
+ extends @ivuorinen/browserslist-config
50
+ ```
51
+
52
+ ## Documentations
53
+
54
+ Read the [Browserslist docs][browserslist-docs-link] for more information.
55
+
56
+ ## Contributing
57
+
58
+ If you are interested in helping contribute, please take a look at our [contribution guidelines][contributing-link] and open an [issue][issue-link] or [pull request][pull-request-link].
59
+
60
+ ## Changelog
61
+
62
+ See [CHANGELOG][changelog-link] for a human-readable history of changes.
63
+
64
+ ## License
65
+
66
+ Distributed under the MIT License. See [LICENSE][license-link] for more information.
67
+
68
+ [changelog-link]: ./CHANGELOG.md
69
+ [browserslist-docs-link]: https://github.com/browserslist/browserslist
70
+ [browserslist-link]: https://github.com/browserslist/browserslist
71
+ [contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
72
+ [issue-link]: https://github.com/ivuorinen/base-configs/issues
73
+ [license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
74
+ [license-link]: ./LICENSE
75
+ [npm-badge]: https://img.shields.io/npm/v/@ivuorinen/browserslist-config?style=flat-square&labelColor=292a44&color=663399
76
+ [npm-link]: https://www.npmjs.com/package/@ivuorinen/browserslist-config
77
+ [pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
78
+ [style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
79
+ [style-link]: https://github.com/ivuorinen/base-configs
80
+ [browsers-badges-link]: https://github.com/alrra/browser-logos
81
+ [android-webview-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/android-webview/android-webview_48x48.png
82
+ [chrome-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_48x48.png
83
+ [edge-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_48x48.png
84
+ [firefox-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_48x48.png
85
+ [opera-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera/opera_48x48.png
86
+ [opera-mini-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera-mini/opera-mini_48x48.png
87
+ [safari-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari_48x48.png
88
+ [safari-ios-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari-ios/safari-ios_48x48.png
89
+ [samsung-internet-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/samsung-internet/samsung-internet_48x48.png
90
+ [uc-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/uc/uc_48x48.png
package/index.js ADDED
@@ -0,0 +1,13 @@
1
+ 'use strict'
2
+
3
+ module.exports = [
4
+ '>= 0.5%',
5
+ 'Chrome >= 60',
6
+ 'Firefox >= 60',
7
+ 'Firefox ESR',
8
+ 'iOS >= 12',
9
+ 'last 2 major versions',
10
+ 'not dead',
11
+ 'not Explorer <= 11',
12
+ 'Safari >= 12'
13
+ ]
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@ivuorinen/browserslist-config",
3
+ "version": "0.1.0",
4
+ "description": "ivuorinen's shareable configuration for Browserslist.",
5
+ "author": {
6
+ "name": "Ismo Vuorinen",
7
+ "url": "https://github.com/ivuorinen"
8
+ },
9
+ "bugs": {
10
+ "url": "https://github.com/ivuorinen/base-configs/issues"
11
+ },
12
+ "engines": {
13
+ "node": ">= 12",
14
+ "npm": ">= 6",
15
+ "yarn": ">=1.20.0"
16
+ },
17
+ "files": [
18
+ "index.js",
19
+ "scripts/*"
20
+ ],
21
+ "homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/browserslist-config#readme",
22
+ "keywords": [
23
+ "browserslist-config",
24
+ "browserslist",
25
+ "config",
26
+ "ivuorinen"
27
+ ],
28
+ "license": "MIT",
29
+ "main": "index.js",
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/ivuorinen/base-configs.git"
36
+ },
37
+ "scripts": {
38
+ "postinstall": "node scripts/postinstall.js"
39
+ },
40
+ "dependencies": {
41
+ "browserslist": "4.21.4"
42
+ },
43
+ "gitHead": "0b2b89ca98caac7995c4c2a3662f0d338043938b"
44
+ }
@@ -0,0 +1,12 @@
1
+ 'use strict'
2
+
3
+ const fs = require('fs')
4
+ const path = require('path')
5
+
6
+ const filePath = path.join(process.env.INIT_CWD, '.browserslistrc')
7
+
8
+ const fileConfigObject = 'extends @ivuorinen/browserslist-config'
9
+
10
+ if (!fs.existsSync(filePath)) {
11
+ fs.writeFileSync(filePath, fileConfigObject)
12
+ }