/flight-recorder

Simple undo for flight

Primary LanguageJavaScriptMIT LicenseMIT

flight-recorder

Build Status

A Flight component for simple undo. Register events with flight-recorder and pass event to action to perform undo

Installation

bower install --save flight-recorder

Example

this.trigger('recorder-register', {
  eventName: 'some-event'
});

this.trigger('some-event', {
  undo: {
    eventName: 'some-other-event',
    data: {}
  }
}

this.trigger('recorder-undo'); // undo last event in history

Development

Development of this component requires Bower, and preferably Karma to be globally installed:

npm install -g bower karma

Then install the Node.js and client-side dependencies by running the following commands in the repo's root directory.

npm install
bower install

To continuously run the tests in Chrome and Firefox during development, just run:

karma start

Contributing to this project

Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.