Skip to content

Commit

Permalink
feat: add browserslist-config, close #3
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Sep 5, 2019
1 parent d9c2217 commit 00af18e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ install:

script:
- yarn run check
- yarn browserslist
- yarn build
- yarn lint
- yarn test
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@types/jest": "^24.0.18",
"@types/node": "^12.7.4",
"@types/react": "^16.9.2",
"browserslist": "^4.7.0",
"eslint": "^6.3.0",
"husky": "^3.0.5",
"jest": "^24.9.0",
Expand All @@ -47,6 +48,9 @@
"typescript": "^3.6.2",
"vue": "^2.6.10"
},
"browserslist": [
"extends @1stg/browserslist-config/modern"
],
"commitlint": {
"extends": [
"@commitlint/config-conventional"
Expand Down
7 changes: 7 additions & 0 deletions packages/browserslist-config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = [
'defaults',
'current node',
'last 5 versions',
'not dead',
'>0.5% in CN',
]
9 changes: 9 additions & 0 deletions packages/browserslist-config/latest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = [
'last 1 Android version',
'last 1 Chrome version',
'last 1 ChromeAndroid version',
'last 1 FireFox version',
'last 1 iOS version',
'last 1 Node version',
'last 1 Safari version',
]
1 change: 1 addition & 0 deletions packages/browserslist-config/modern.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('.').concat(['not ie <= 11', 'not ie_mob <= 11'])
14 changes: 14 additions & 0 deletions packages/browserslist-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@1stg/browserslist-config",
"version": "0.0.0",
"description": "Personal but Shareable Browserslist Configuration for all 1stG.me projects.",
"repository": "[email protected]:1stG/configs.git",
"author": "JounQin <[email protected]>",
"license": "MIT",
"peerDependencies": {
"browserslist": "^4.7.0"
},
"publishConfig": {
"access": "public"
}
}
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3101,7 +3101,7 @@ browser-resolve@^1.11.3:
dependencies:
resolve "1.1.7"

browserslist@^4.6.0, browserslist@^4.6.3, browserslist@^4.6.6:
browserslist@^4.6.0, browserslist@^4.6.3, browserslist@^4.6.6, browserslist@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17"
integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA==
Expand Down

0 comments on commit 00af18e

Please sign in to comment.