Skip to content

Commit

Permalink
fix: simplify babel setup and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Mar 29, 2019
1 parent c276a62 commit f92ec86
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 86 deletions.
15 changes: 15 additions & 0 deletions packages/dnb-design-system-portal/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"presets": [
[
"babel-preset-gatsby",
{
"targets": {
"browsers": ["last 2 versions", "explorer >= 11"]
},
"useBuiltIns": "usage",
"corejs": 2
}
]
],
"plugins": ["emotion"]
}
18 changes: 7 additions & 11 deletions packages/dnb-design-system-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,19 @@
"prettier:package": "prettier-package-json --write ./package.json"
},
"dependencies": {
"core-js": "2",
"core-js": "2.6.5",
"dnb-ui-lib": "*",
"react": "^16.8.5",
"react-dom": "^16.8.5"
},
"devDependencies": {
"@babel/core": "^7.4.0",
"@babel/node": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/plugin-proposal-object-rest-spread": "^7.4.0",
"@babel/polyfill": "^7.4.0",
"@babel/preset-env": "^7.4.2",
"@babel/preset-react": "^7.0.0",
"@mdx-js/mdx": "0.20.3",
"@mdx-js/tag": "0.20.3",
"babel-plugin-emotion": "^10.0.9",
"babel-preset-gatsby": "^0.1.10",
"camelcase": "^5.2.0",
"ci-info": "^2.0.0",
"classnames": "^2.2.6",
Expand All @@ -77,17 +73,17 @@
"eslint-plugin-react": "^7.12.4",
"front-matter": "^3.0.1",
"fs-extra": "^7.0.1",
"gatsby": "^2.2.10",
"gatsby": "^2.3.4",
"gatsby-link": "^2.0.16",
"gatsby-mdx": "^0.4.4",
"gatsby-plugin-catch-links": "^2.0.13",
"gatsby-plugin-emotion": "^4.0.6",
"gatsby-plugin-manifest": "^2.0.24",
"gatsby-plugin-manifest": "^2.0.26",
"gatsby-plugin-offline": "^2.0.25",
"gatsby-plugin-postcss": "^2.0.7",
"gatsby-plugin-react-helmet": "^3.0.10",
"gatsby-plugin-react-helmet": "^3.0.11",
"gatsby-plugin-sass": "^2.0.11",
"gatsby-plugin-sharp": "^2.0.30",
"gatsby-plugin-sharp": "^2.0.32",
"gatsby-remark-images": "^3.0.10",
"gatsby-source-filesystem": "^2.0.28",
"gh-pages": "^2.0.1",
Expand All @@ -114,7 +110,7 @@
"react-markdown": "^4.0.6",
"stylelint": "^9.10.1",
"stylelint-config-styled-components": "^0.1.1",
"stylelint-processor-styled-components": "^1.5.2"
"stylelint-processor-styled-components": "^1.6.0"
},
"buildVersion": "[LOCAL BUILD]"
}
12 changes: 11 additions & 1 deletion packages/dnb-design-system-portal/scripts/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{
"extends": "../src/.babelrc"
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "10.6"
}
}
]
],
"ignore": ["node_modules/**"]
}
22 changes: 0 additions & 22 deletions packages/dnb-design-system-portal/src/.babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion packages/dnb-ui-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"dependencies": {
"body-scroll-lock": "^2.6.1",
"classnames": "^2.2.6",
"core-js": "2",
"keycode": "^2.2.0",
"react-text-mask": "^5.4.3",
"what-input": "^5.1.4"
Expand Down Expand Up @@ -114,6 +113,7 @@
"chalk": "^2.4.2",
"ci-info": "^2.0.0",
"color": "^3.1.0",
"core-js": "2.6.5",
"css-loader": "^2.1.1",
"del": "^4.0.0",
"detect-port": "^1.3.0",
Expand Down
Loading

0 comments on commit f92ec86

Please sign in to comment.