mirror of
https://github.com/ivuorinen/base-configs.git
synced 2026-03-10 18:57:48 +00:00
Initial commit
This commit is contained in:
1
packages/browserslist-config/.browserslistrc
Normal file
1
packages/browserslist-config/.browserslistrc
Normal file
@@ -0,0 +1 @@
|
||||
extends @ivuorinen/browserslist-config
|
||||
3
packages/browserslist-config/CHANGELOG.md
Normal file
3
packages/browserslist-config/CHANGELOG.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
21
packages/browserslist-config/LICENSE
Normal file
21
packages/browserslist-config/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Ismo Vuorinen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
90
packages/browserslist-config/README.md
Normal file
90
packages/browserslist-config/README.md
Normal file
@@ -0,0 +1,90 @@
|
||||
# @ivuorinen/browserslist-config <!-- omit in toc -->
|
||||
|
||||
[![npm package][npm-badge]][npm-link] [![license MIT][license-badge]][license-link] [![ivuorinen's Code Style][style-badge]][style-link]
|
||||
|
||||
> ivuorinen's shareable configuration for [`Browserslist`][browserslist-link].
|
||||
|
||||
## Table of Contents <!-- omit in toc -->
|
||||
|
||||
- [Supported Browsers](#supported-browsers)
|
||||
- [Desktop Browsers](#desktop-browsers)
|
||||
- [Mobile Browsers](#mobile-browsers)
|
||||
- [Installation](#installation)
|
||||
- [Documentations](#documentations)
|
||||
- [Contributing](#contributing)
|
||||
- [Changelog](#changelog)
|
||||
- [License](#license)
|
||||
|
||||
## Supported Browsers
|
||||
|
||||
### Desktop Browsers
|
||||
|
||||
| [![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] |
|
||||
| :---------------------------------------------: | :-----------------------------------------: | :-----------------------------------------------: | :-------------------------------------------: | :---------------------------------------------: |
|
||||
| Chrome | Edge | Firefox | Opera | Safari |
|
||||
| >= 60 | last 2 | >= 60 | last 2 | >= 12 |
|
||||
|
||||
### Mobile Browsers
|
||||
|
||||
| [![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] |
|
||||
| :---------------------------------------------------------------: | :---------------------------------------------: | :-----------------------------------------------: | :-----------------------------------------------------: | :-----------------------------------------------------: | :-----------------------------------------------------------------: | :-------------------------------------: |
|
||||
| Android WebView | Chrome | Firefox | Opera Mini | Safari iOS | Samsung Internet | UC |
|
||||
| last 2 | last 2 | last 2 | last 2 | >= 12 | last 2 | last 2 |
|
||||
|
||||
## Installation
|
||||
|
||||
Install `this config` as a _`devDependencies`_:
|
||||
|
||||
```sh
|
||||
# npm
|
||||
npm install @ivuorinen/browserslist-config --save-dev
|
||||
|
||||
# Yarn
|
||||
yarn add @ivuorinen/browserslist-config --dev
|
||||
```
|
||||
|
||||
After installing it, a _`.browserslistrc`_ file will be created automatically in the project's root folder with the following configuration:
|
||||
|
||||
```json
|
||||
extends @ivuorinen/browserslist-config
|
||||
```
|
||||
|
||||
## Documentations
|
||||
|
||||
Read the [Browserslist docs][browserslist-docs-link] for more information.
|
||||
|
||||
## Contributing
|
||||
|
||||
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].
|
||||
|
||||
## Changelog
|
||||
|
||||
See [CHANGELOG][changelog-link] for a human-readable history of changes.
|
||||
|
||||
## License
|
||||
|
||||
Distributed under the MIT License. See [LICENSE][license-link] for more information.
|
||||
|
||||
[changelog-link]: ./CHANGELOG.md
|
||||
[browserslist-docs-link]: https://github.com/browserslist/browserslist
|
||||
[browserslist-link]: https://github.com/browserslist/browserslist
|
||||
[contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
|
||||
[issue-link]: https://github.com/ivuorinen/base-configs/issues
|
||||
[license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
|
||||
[license-link]: ./LICENSE
|
||||
[npm-badge]: https://img.shields.io/npm/v/@ivuorinen/browserslist-config?style=flat-square&labelColor=292a44&color=663399
|
||||
[npm-link]: https://www.npmjs.com/package/@ivuorinen/browserslist-config
|
||||
[pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
|
||||
[style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
|
||||
[style-link]: https://github.com/ivuorinen/base-configs
|
||||
[browsers-badges-link]: https://github.com/alrra/browser-logos
|
||||
[android-webview-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/android-webview/android-webview_48x48.png
|
||||
[chrome-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_48x48.png
|
||||
[edge-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_48x48.png
|
||||
[firefox-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_48x48.png
|
||||
[opera-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera/opera_48x48.png
|
||||
[opera-mini-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera-mini/opera-mini_48x48.png
|
||||
[safari-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari_48x48.png
|
||||
[safari-ios-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari-ios/safari-ios_48x48.png
|
||||
[samsung-internet-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/samsung-internet/samsung-internet_48x48.png
|
||||
[uc-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/uc/uc_48x48.png
|
||||
13
packages/browserslist-config/index.js
Normal file
13
packages/browserslist-config/index.js
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = [
|
||||
'>= 0.5%',
|
||||
'Chrome >= 60',
|
||||
'Firefox >= 60',
|
||||
'Firefox ESR',
|
||||
'iOS >= 12',
|
||||
'last 2 major versions',
|
||||
'not dead',
|
||||
'not Explorer <= 11',
|
||||
'Safari >= 12'
|
||||
]
|
||||
43
packages/browserslist-config/package.json
Normal file
43
packages/browserslist-config/package.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "@ivuorinen/browserslist-config",
|
||||
"version": "0.1.0",
|
||||
"description": "ivuorinen's shareable configuration for Browserslist.",
|
||||
"author": {
|
||||
"name": "Ismo Vuorinen",
|
||||
"url": "https://github.com/ivuorinen"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ivuorinen/base-configs/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12",
|
||||
"npm": ">= 6",
|
||||
"yarn": ">=1.20.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"scripts/*"
|
||||
],
|
||||
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/browserslist-config#readme",
|
||||
"keywords": [
|
||||
"browserslist-config",
|
||||
"browserslist",
|
||||
"config",
|
||||
"ivuorinen"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ivuorinen/base-configs.git"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "node scripts/postinstall.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"browserslist": "4.21.4"
|
||||
}
|
||||
}
|
||||
12
packages/browserslist-config/scripts/postinstall.js
Normal file
12
packages/browserslist-config/scripts/postinstall.js
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const filePath = path.join(process.env.INIT_CWD, '.browserslistrc')
|
||||
|
||||
const fileConfigObject = 'extends @ivuorinen/browserslist-config'
|
||||
|
||||
if (!fs.existsSync(filePath)) {
|
||||
fs.writeFileSync(filePath, fileConfigObject)
|
||||
}
|
||||
Reference in New Issue
Block a user