Skip to content

Commit

Permalink
Merge pull request #234 from thiamsantos/master
Browse files Browse the repository at this point in the history
Closes #233.
  • Loading branch information
grushetsky authored Mar 19, 2018
2 parents e721e17 + 507611b commit 3ca9f2c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"version": "3.0.6",
"description": "Logger for Redux",
"main": "dist/redux-logger.js",
"module": "dist/redux-logger.es.js",
"jsnext:main": "dist/redux-logger.es.js",
"scripts": {
"lint": "eslint src",
"test": "npm run lint && npm run spec",
Expand All @@ -12,7 +14,8 @@
"coverage:html": "nyc report --reporter=html && http-server -p 8077 ./coverage -o",
"coverage:production": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"clean": "rimraf dist",
"build": "rollup -c",
"uglify": "uglifyjs dist/redux-logger.js -cm -o dist/redux-logger.js",
"build": "rollup -c && npm run uglify",
"precommit": "npm test && npm run lint",
"prepublish": "npm run clean && npm test && npm run lint && npm run build"
},
Expand Down Expand Up @@ -79,8 +82,8 @@
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^1.0.2",
"sinon": "^1.17.7"
"sinon": "^1.17.7",
"uglify-js": "^3.0.8"
},
"dependencies": {
"deep-diff": "^0.3.5"
Expand Down
18 changes: 12 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import uglify from 'rollup-plugin-uglify';

export default {
entry: 'src/index.js',
format: 'umd',
exports: 'named',
moduleName: 'reduxLogger',
dest: 'dist/redux-logger.js',
plugins: [
babel({
babelrc: false,
Expand All @@ -29,7 +25,17 @@ export default {
jsnext: true,
main: true,
browser: true,
}),
uglify(),
})
],
targets: [
{
format: 'umd',
moduleName: 'reduxLogger',
dest: 'dist/redux-logger.js',
},
{
format: 'es',
dest: 'dist/redux-logger.es.js'
}
]
};

0 comments on commit 3ca9f2c

Please sign in to comment.