Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
node_js:
- "6"
script: npm run test:production
script: npm test

# Repository token must be provided in "coverage:production" npm script
after_success: npm run coverage:production
58 changes: 33 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,33 @@
"name": "redux-logger",
"version": "3.0.1",
"description": "Logger for Redux",
"main": "lib/index.js",
"main": "dist/redux-logger.js",
"module": "src/index.js",
"jsnext:main": "src/index.js",
"scripts": {
"lint": "$(npm bin)/eslint src",
"test": "NODE_ENV=development npm run lint && npm run spec",
"test:production": "NODE_ENV=production npm run lint && npm run spec",
"spec": "NODE_PATH=src nyc --all --silent --require babel-core/register mocha --plugins transform-inline-environment-variables --recursive spec/*.spec.js",
"spec:watch": "NODE_ENV=development npm run spec -- --watch",
"lint": "eslint src",
"test": "npm run lint && npm run spec",
"spec": "nyc --all --silent --require babel-core/register mocha --plugins transform-inline-environment-variables --recursive spec/*.spec.js",
"spec:watch": "npm run spec -- --watch",
"coverage": "nyc report",
"coverage:html": "nyc report --reporter=html && (http-server -p 8077 ./coverage & open-url http://localhost:8077/)",
"coverage:html": "nyc report --reporter=html && http-server -p 8077 ./coverage -o",
"coverage:production": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"clean": "$(npm bin)/rimraf dist lib",
"build:lib": "$(npm bin)/babel src --out-dir lib",
"build:umd": "LIBRARY_NAME=reduxLogger NODE_ENV=development $(npm bin)/webpack src/index.js dist/index.js --config webpack.build.js",
"build:umd:min": "LIBRARY_NAME=reduxLogger NODE_ENV=production $(npm bin)/webpack -p src/index.js dist/index.min.js --config webpack.build.js",
"build": "npm run build:lib && npm run build:umd && npm run build:umd:min",
"precommit": "npm run test",
"prepublish": "npm run clean && npm run test:production && npm run build"
"clean": "rimraf dist",
"build": "rollup -c",
"precommit": "npm test",
"prepublish": "npm run clean && npm test && npm run build"
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can move scripts as they appears? For example, build run rollup, so rollup must be higher than build

"babel": {
"presets": [
"es2015",
"stage-0"
]
},
"eslintConfig": {
"extends": "airbnb",
"env": {
"browser": true
}
},
"nyc": {
"exclude": [
Expand All @@ -27,12 +37,11 @@
"example",
"lib",
"dist",
"webpack.*.js"
"rollup.config.js"
]
},
"files": [
"dist",
"lib",
"src"
],
"repository": {
Expand All @@ -52,14 +61,10 @@
},
"homepage": "https://github.com/theaqua/redux-logger#readme",
"devDependencies": {
"babel-cli": "^6.24.0",
"babel-core": "^6.24.0",
"babel-loader": "^6.4.1",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-transform-es2015-modules-umd": "6.24.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-inline-environment-variables": "6.8.0",
"babel-preset-es2015": "^6.24.0",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-0": "^6.22.0",
"chai": "3.5.0",
"codecov": "1.0.1",
Expand All @@ -72,13 +77,16 @@
"husky": "^0.13.2",
"mocha": "3.1.2",
"nyc": "9.0.1",
"open-url": "2.0.2",
"redux": "^3.6.0",
"rimraf": "^2.6.1",
"sinon": "^1.17.7",
"webpack": "1.13.3"
"rollup": "^0.41.6",
"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"
},
"dependencies": {
"deep-diff": "0.3.4"
"deep-diff": "^0.3.5"
}
}
35 changes: 35 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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,
presets: [
['es2015', {
modules: false,
}],
'stage-0'
],
plugins: [
'external-helpers'
],
}),
commonjs({
include: 'node_modules/**',
}),
nodeResolve({
jsnext: true,
main: true,
browser: true,
}),
uglify()
]
};
2 changes: 1 addition & 1 deletion spec/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sinon from 'sinon';

import { applyMiddleware, createStore } from 'redux';

import { repeat } from 'helpers';
import { repeat } from '../src/helpers';
import logger, { createLogger } from '../src';

context(`Helpers`, () => {
Expand Down
4 changes: 0 additions & 4 deletions webpack.build.js

This file was deleted.

23 changes: 0 additions & 23 deletions webpack.config.js

This file was deleted.