Skip to content
This repository has been archived by the owner on Mar 20, 2022. It is now read-only.

Commit

Permalink
Merge branch 'Andarist-dedupe-babel-config'
Browse files Browse the repository at this point in the history
  • Loading branch information
paularmstrong committed Feb 8, 2018
2 parents 8bfdd98 + 4c02272 commit 84bac9d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 182 deletions.
8 changes: 1 addition & 7 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
{
"presets": [ [ "env", { "loose": true } ] ],
"plugins": [
"babel-plugin-transform-object-rest-spread",
"babel-plugin-transform-class-properties"
]
}
{ "presets": ["./.babelrc.js"] }
13 changes: 13 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { NODE_ENV, BABEL_ENV } = process.env;

const cjs = BABEL_ENV === 'cjs' || NODE_ENV === 'test';

module.exports = {
presets: [['env', { modules: false, loose: true }]],
plugins: [
cjs && 'transform-es2015-modules-commonjs',
'transform-object-rest-spread',
// TODO: use 'loose' mode for this after upgrading to babel@7
'transform-class-properties'
].filter(Boolean)
};
20 changes: 3 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,8 @@
"url": "https://github.com/paularmstrong/normalizr.git",
"type": "git"
},
"keywords": [
"flux",
"redux",
"normalize",
"denormalize",
"api",
"json"
],
"files": [
"dist/",
"index.d.ts",
"LICENSE",
"README.md"
],
"keywords": ["flux", "redux", "normalize", "denormalize", "api", "json"],
"files": ["dist/", "index.d.ts", "LICENSE", "README.md"],
"main": "dist/normalizr.js",
"module": "dist/normalizr.es.js",
"typings": "index.d.ts",
Expand All @@ -42,9 +30,7 @@
"test:coverage": "npm run test -- --coverage && cat ./coverage/lcov.info | coveralls"
},
"author": "Paul Armstrong",
"contributors": [
"Dan Abramov"
],
"contributors": ["Dan Abramov"],
"license": "MIT",
"devDependencies": {
"babel-core": "^6.26.0",
Expand Down
4 changes: 1 addition & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export default {
],
plugins: [
babel({
babelrc: false,
presets: [ [ 'env', { modules: false, loose: true } ] ],
plugins: [ 'external-helpers', 'babel-plugin-transform-object-rest-spread' ]
plugins: ['external-helpers']
}),
isProduction && uglify({}, minify),
filesize()
Expand Down

0 comments on commit 84bac9d

Please sign in to comment.