From 7fa1352e8d93f793e6a23d0f2f543e12d134621c Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 18 May 2017 13:21:58 -0300 Subject: [PATCH 1/2] fix #233 and remove src folder from been published --- package.json | 12 +++++++----- rollup.config.js | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 285f55e..c1c5fb1 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", "prepublish": "npm run clean && npm test && npm run build" }, @@ -38,8 +41,7 @@ ] }, "files": [ - "dist", - "src" + "dist" ], "repository": { "type": "git", @@ -79,8 +81,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" diff --git a/rollup.config.js b/rollup.config.js index a18a65b..b2930a5 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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, @@ -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' + } + ] }; From 0a0f0cf9b781cff216cff3b9a74048567b6b58bf Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 16 Aug 2017 11:19:57 -0300 Subject: [PATCH 2/2] Bring back src folder --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c1c5fb1..46978ee 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,8 @@ ] }, "files": [ - "dist" + "dist", + "src" ], "repository": { "type": "git",