Skip to content

Commit a94edd6

Browse files
committed
feat: ✨ Add Cozy browserslist config package
1 parent 9e35b48 commit a94edd6

File tree

8 files changed

+324
-2
lines changed

8 files changed

+324
-2
lines changed

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ packages/cozy-realtime @gregorylegarec @cpatchane
44
packages/babel-preset-cozy-app @cpatchane
55
packages/eslint-config-cozy-app @cpatchane
66
packages/commitlint-config-cozy @kosssi @enguerran
7+
packages/browserslist-config-cozy @cpatchane @Crash--
78
packages/cozy-app-publish @cpatchane @gregorylegarec @y-lohse
89
packages/cozy-interapp @gregorylegarec @kosssi
910
packages/cozy-doctypes @ptbrowne @kosssi

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
## Dev tools
1414

1515
- [Babel Preset Cozy App](./packages/babel-preset-cozy-app): Config for babel transpiling (for applications and libraries)
16-
- [Cozy Commitlint Config](./packages/commitlint-config): Commitlint config enforcing the cozy commit convention
16+
- [Cozy Commitlint Config](./packages/commitlint-config-cozy): Commitlint config enforcing the cozy commit convention
17+
- [Cozy Browserslist Config](./packages/browserslist-config-cozy): Browserslist config enforcing the official Cozy supported browsers
1718
- [ESLint Config Cozy App](./packages/eslint-config-cozy-app): Config for eslint using prettier (for applications and libraries)
1819

1920
## CLI
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Browserslist Config Cozy
2+
3+
> Shareable Browserslist config enforcing the official Cozy supported browsers
4+
5+
## Documentations and usage
6+
7+
- [Browserslist shared config](https://github.com/browserslist/browserslist#shareable-configs)
8+
9+
## Community
10+
11+
### What's Cozy?
12+
13+
<div align="center">
14+
<a href="https://cozy.io">
15+
<img src="https://cdn.rawgit.com/cozy/cozy-site/master/src/images/cozy-logo-name-horizontal-blue.svg" alt="cozy" height="48" />
16+
</a>
17+
</div>
18+
</br>
19+
20+
[Cozy] is a platform that brings all your web services in the same private space. With it, your webapps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one's tracking you.
21+
22+
### Get in touch
23+
24+
You can reach the Cozy Community by:
25+
26+
- Chatting with us on IRC [#cozycloud on Freenode][freenode]
27+
- Posting on our [Forum][forum]
28+
- Posting issues on the [Github repos][github]
29+
- Say Hi! on [Twitter][twitter]
30+
31+
### Maintainers
32+
33+
The maintainers for Browserslist Config Cozy are [CPatchane](https://github.com/CPatchane) and [Crash--](https://github.com/Crash--)!
34+
35+
## License
36+
37+
`browserslist-config-cozy` is distributed under the MIT license.
38+
39+
[cozy]: https://cozy.io "Cozy Cloud"
40+
[freenode]: http://webchat.freenode.net/?randomnick=1&channels=%23cozycloud&uio=d4
41+
[forum]: https://forum.cozy.io/
42+
[github]: https://github.com/cozy/
43+
[twitter]: https://twitter.com/cozycloud
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`browserslist should contain all Cozy supported browsers 1`] = `
4+
Array [
5+
"last 2 Chrome major versions",
6+
"last 2 Firefox major versions",
7+
"last 2 FirefoxAndroid major versions",
8+
"last 2 Safari major versions",
9+
"last 3 iOS major versions",
10+
"last 2 Edge major versions",
11+
"Firefox ESR",
12+
"Android 4.4",
13+
"> 1% in FR",
14+
"not dead",
15+
"not ie <= 11",
16+
]
17+
`;
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/***
2+
* We need to target Android 5 and at least iOS 10 for our mobile apps.
3+
* We have to target Android 4.4 since Android 5 doesn't exist because Webview and OS
4+
* version are different since Android 5.
5+
* We didn't find any query targeting Android 5 with a very old browser (ie no updated),
6+
* we can consider targeting Samsung browser since it should follow Android Browser
7+
* but I'm not sure this is the right way to do.
8+
* Changed to 3 last majors version of iOS because I think 2 is pretty dangerous specially when a new iOS version is released.
9+
*/
10+
module.exports = [
11+
'last 2 Chrome major versions',
12+
'last 2 Firefox major versions',
13+
'last 2 FirefoxAndroid major versions',
14+
'last 2 Safari major versions',
15+
'last 3 iOS major versions',
16+
'last 2 Edge major versions',
17+
'Firefox ESR',
18+
'Android 4.4',
19+
'> 1% in FR',
20+
'not dead',
21+
'not ie <= 11'
22+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe('browserslist', () => {
2+
it('should contain all Cozy supported browsers', () => {
3+
expect(require('./')).toMatchSnapshot()
4+
})
5+
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "browserslist-config-cozy",
3+
"version": "0.1.0",
4+
"description": "Shareable browserslist config enforcing the Cozy official supported browsers list",
5+
"main": "index.js",
6+
"author": "Cozy",
7+
"license": "MIT",
8+
"homepage": "https://github.com/cozy/cozy-libs/blob/master/packages/browserslist-config-cozy/README.md",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/cozy/cozy-libs.git"
12+
},
13+
"bugs": {
14+
"url": "https://github.com/cozy/cozy-libs/issues"
15+
},
16+
"scripts": {
17+
"test": "jest --env node ./*.spec.js"
18+
},
19+
"devDependencies": {
20+
"jest-cli": "^24.1.0"
21+
},
22+
"files": [
23+
"index.js",
24+
"README.md"
25+
]
26+
}

0 commit comments

Comments
 (0)