Ember States is Ember's implementation of a finite state machine. A StateManager instance manages a number of properties that are instances of Ember.State
, tracks the current active state, and triggers callbacks when states have changed.
For more info check documentation of Ember.StateManager
in packages/ember-states/lib/state_manager.js
- Download the latest build.
- In your application, include ember-states.js immediately after Ember.
- Enjoy!
- Run
bundle install
to fetch the necessary ruby gems. - Run
rake dist
to build Ember.js. Two builds will be placed in thedist/
directory.
ember-states.js
andember-states.min.js
If you are building under Linux, you will need a JavaScript runtime for minification, for which we recommend installing nodejs. Alternatively you may have luck with another of the runtimes supported by execjs.
-
Install Ruby 1.9.3+. There are many resources on the web can help; one of the best is rvm.
-
Install Bundler:
gem install bundler
-
Run
bundle
inside the project root to install the gem dependencies.
-
To start the development server, run
rackup
. -
Then visit:
http://localhost:9292/
-
Install phantomjs from http://phantomjs.org
-
Run
rake test
to run a basic test suite or runrake test[all]
to run a more comprehensive suite. -
(Mac OS X Only) Run
rake autotest
to automatically re-run tests when any files are changed.