项目作者: almin

项目描述 :
Integrate almin into redux-devtools
高级语言: JavaScript
项目地址: git://github.com/almin/almin-devtools.git
创建时间: 2017-03-09T14:15:14Z
项目社区:https://github.com/almin/almin-devtools

开源协议:MIT License

下载


almin-devtools

Integrate almin into Redux DevTools Extension.

ScreenShot

Features

  • Lets you inspect every state and UseCase/dispatch
  • See diff of the state
  • Import/Export log

Installation

  1. Install Redux DevTools Extension to browser
  2. Install almin-devtools via npm
  3. Connect almin to Redux DevTools Extension

Installation of DevTools extension

1. For Chrome

2. For Firefox

3. For Electron

4. For other browsers and non-browser environment

Installation of almin-devtools

Install with npm:

  1. npm install almin-devtools

Usage

Connect from your application to redux-devtools.

  1. import { Context, Dispatcher, StoreGroup } from "almin";
  2. import AlminDevTools from "almin-devtools"
  3. import { CounterStore } from "../store/CounterStore";
  4. const dispatcher = new Dispatcher();
  5. const store = new StoreGroup([new CounterStore()]);
  6. const appContext = new Context({
  7. dispatcher,
  8. store
  9. });
  10. // initialize devTools
  11. const devTools = new AlminDevTools(appContext);
  12. devTools.connect(); // connect to redux-devtools
  13. /* customize redux-devtools options
  14. devTools.connect({
  15. features: {
  16. pause: true, // start/pause recording of dispatched actions
  17. lock: true, // lock/unlock dispatching actions and side effects
  18. persist: false, // persist states on page reloading
  19. export: true, // export history of actions in a file
  20. import: 'almin-log', // import history of actions from a file
  21. jump: false, // jump back and forth (time travelling)
  22. skip: false, // skip (cancel) actions
  23. reorder: false, // drag and drop actions in the history list
  24. dispatch: false, // dispatch custom actions or action creators
  25. test: true // generate tests for the selected actions
  26. }
  27. });
  28. */
  29. devTools.init(appContext.getState()); // record initial state

See Methods (advanced API) · Redux DevTools Extension for more details.

Alternative

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

  1. npm i -d && npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu