** Running the module ** This module is intended to be a console-only version of the a Mirador-like viewer, with tests and the ability to manipulate the state tree through actions in the console.
To run the module, first make sure you are in this directory (minimal_redux_poc
), then:
- Run the
npm run build:umd
task. This will produce an "isomorphic" webpack bundle of the module that can run in the console or browser. The bundle will be calledindex.umd.js
and is placed in this same directory. - Open a nodejs console (type
node
) in this directory. - Require the module under a variable name, for example,
state = require('./index.umd')
. - The exported module currently has most of its functionality under the "store" property, so you may prefer to include it with
state = require('./index.umd').store
.
Example Action
To increment the canvas index run:
state.store.dispatch({type: "INCREMENT"})