Skip to content
Snippets Groups Projects
Select Git revision
  • ece3150b5e5e42d70f6ffeebad09339b09e4d950
  • annotation-on-video default protected
  • demo_ci
  • 3-upstream-01022023
  • master
  • gh3538-captions
  • 16-adapt-for-images-annot
  • 15-api-for-annotations-on-video
  • 15-annotations-on-videos
  • video_for_annotations
  • wip-1-annotations-on-videos
  • 9-videoviewer-tests
  • 9_wip_videotests
  • 6-fix-tests-and-ci
  • _fix_ci
  • wip-webpack-from-git
16 results

README.md

Blame
  • 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:

    1. Run npm install to install the dependencies.
    2. 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 called m3core.umd.js and is placed in the dist directory.
    3. Open a nodejs console (type node) in this directory.
    4. Import variable names from the module, for example, let { store, actions } = require('./index.umd').
    5. The exported module currently has most of its functionality under the "store" property, so you may prefer to include it with let state = require('./index.umd').store.

    Starting the project

    $ npm start

    Then navigate to http://127.0.0.1:4444/tests/integration/mirador/

    Example Action

    Add a window:

    store.dispatch(actions.addWindow());

    To focus a window run:

    store.dispatch(actions.focusWindow('window-1'))

    Check current state

    store.getState()

    Running the tests

    $ npm test

    or to continually watch the source files

    $ npm run test:watch

    Linting the project

    $ npm run lint

    Debugging

    Redux DevTools

    This is a web browser extension for debugging Redux applications. See https://github.com/zalmoxisus/redux-devtools-extension for installation and usage instructions.