Skip to content

Code Clean up #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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: 3 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"presets": ["es2015"]
"presets": [
"@babel/preset-env"
]
}
34 changes: 34 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 2

defaults: &defaults
docker:
- image: circleci/node:8

jobs:
build:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: npm run lint
- run: npm test
- persist_to_workspace:
root: ~/project
paths:
- dist/
- .npmrc
- node_modules/

workflows:
version: 2
build-:
jobs:
- build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ example/build
dist
lib
yarn.lock

.idea
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# Logger for Redux
[![npm](https://img.shields.io/npm/v/redux-logger.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/package/redux-logger)
[![npm](https://img.shields.io/npm/dm/redux-logger.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/package/redux-logger)
[![Build Status](https://travis-ci.org/evgenyrodionov/redux-logger.svg?branch=master)](https://travis-ci.org/evgenyrodionov/redux-logger)
[![Build Status](https://circleci.com/gh/LogRocket/redux-logger/tree/master.svg?style=svg)](https://circleci.com/gh/LogRocket/redux-logger/tree/master)

![redux-logger](http://i.imgur.com/CgAuHlE.png)

Now maintained by [LogRocket](https://logrocket.com?cid=github_redux)!

[![](https://i.imgur.com/Yp5mUx2.png)](https://logrocket.com?cid=github_redux)

> LogRocket is a production Redux logging tool that lets you replay problems as if they happened in your own browser. Instead of guessing why errors happen, or asking users for screenshots and log dumps, LogRocket lets you replay Redux actions + state, network requests, console logs, and see a video of what the user saw.

For more informatiom about the future of redux-logger, check out the [discussion here](https://github.com/LogRocket/redux-logger/issues/314).

## Table of contents
* [Install](#install)
* [Usage](#usage)
Expand All @@ -23,6 +31,10 @@
## Install
`npm i --save redux-logger`

Typescript types are also available, via [DefinitelyTyped](https://www.npmjs.com/package/@types/redux-logger):

`npm i @types/redux-logger`

## Usage
```javascript
import { applyMiddleware, createStore } from 'redux';
Expand All @@ -37,7 +49,7 @@ const store = createStore(
// Note passing middleware as the third argument requires redux@>=3.1.0
```

Or you can create your own logger with custom [options](https://github.com/evgenyrodionov/redux-logger#options):
Or you can create your own logger with custom [options](https://github.com/LogRocket/redux-logger#options):
```javascript
import { applyMiddleware, createStore } from 'redux';
import { createLogger } from 'redux-logger'
Expand All @@ -52,7 +64,7 @@ const store = createStore(
);
```

Note: logger **must be** the last middleware in chain, otherwise it will log thunk and promise, not actual actions ([#20](https://github.com/evgenyrodionov/redux-logger/issues/20)).
Note: logger **must be** the last middleware in chain, otherwise it will log thunk and promise, not actual actions ([#20](https://github.com/LogRocket/redux-logger/issues/20)).

## Options
```javascript
Expand All @@ -63,7 +75,7 @@ Note: logger **must be** the last middleware in chain, otherwise it will log thu
timestamp = true: Boolean, // print the timestamp with each action?

level = 'log': 'log' | 'console' | 'warn' | 'error' | 'info', // console's level
colors: ColorsObject, // colors for title, prev state, action and next state: https://github.com/evgenyrodionov/redux-logger/blob/master/src/defaults.js#L12-L18
colors: ColorsObject, // colors for title, prev state, action and next state: https://github.com/LogRocket/redux-logger/blob/master/src/defaults.js#L12-L18
titleFormatter, // Format the title used when logging actions.

stateTransformer, // Transform state before print. Eg. convert Immutable object to plain JSON.
Expand Down Expand Up @@ -290,7 +302,7 @@ export default createLogger({
Feel free to create PR for any of those tasks!

## Known issues
* Performance issues in react-native ([#32](https://github.com/evgenyrodionov/redux-logger/issues/32))
* Performance issues in react-native ([#32](https://github.com/LogRocket/redux-logger/issues/32))

## License
MIT
Loading