Skip to content

Commit

Permalink
build: use browserslist-config-wordpress Browserslist shared config (
Browse files Browse the repository at this point in the history
…#68)

* build: use `browserslist-config-wordpress` Browserslist shared config

* chore(babel-preset-default): switch to `@wordpress/browserslist-config`

* chore: fix merge conflict

* chore: regenerate `package-lock.json`

* Browserslit config: Add devDependency in the root repository

* Babel preset default: Add missing spaces around square brackets
  • Loading branch information
ntwb authored Feb 1, 2018
1 parent b44fd21 commit aa821b7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"npm": ">=5.0.0"
},
"devDependencies": {
"@wordpress/browserslist-config": "^2.0.0",
"babel-core": "^6.26.0",
"chalk": "^2.0.1",
"check-node-version": "^3.1.1",
Expand Down
13 changes: 1 addition & 12 deletions packages/babel-preset-default/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,7 @@ module.exports = {
! isTestEnv && [ require( 'babel-preset-env' ), {
modules: false,
targets: {
browsers: [
'last 2 Chrome versions',
'last 2 Firefox versions',
'last 2 Safari versions',
'last 2 Edge versions',
'last 2 Opera versions',
'last 2 iOS versions',
'last 1 Android version',
'last 1 ChromeAndroid version',
'ie 11',
'> 1%',
],
browsers: [ 'extends @wordpress/browserslist-config' ],
},
} ],
isTestEnv && [ require( 'babel-preset-env' ) ],
Expand Down
7 changes: 6 additions & 1 deletion packages/babel-preset-default/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/babel-preset-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"node": ">=8"
},
"dependencies": {
"@wordpress/browserslist-config": "^2.0.0",
"babel-plugin-lodash": "^3.3.2",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-react-jsx": "^6.24.1",
Expand Down

0 comments on commit aa821b7

Please sign in to comment.