Git Product home page Git Product logo

sproutcore-statechart's Introduction

SproutCore (Ember.js) Statechart

Description:

This is a port of the SproutCore Statechart library from the SproutCore 1.x framework for use in SproutCore 2.0 (Ember.js) applications. It was principally authored by Michael Cohen (aka. FrozenCanuck).

Synopsis:

TODO: Add documentation to the README.

For the time being, there are plenty of examples in the source code, and example usage throughout the extensive unit tests.

Learning by Example

We are working hard to provide more documentation and examples for Ember.js and here specifically for the statechart framework. Until there is more, you can learn from this example:

Quick Notes - Example Ember.js Application for statecharts and routing support

Building sproutcore-statechart.js

You need ruby and some gems to build the source code and to run unit tests.

  1. Install Ruby 1.9.2+. There are many resources on the web can help; one of the best is rvm.

  2. Install Bundler: gem install bundler

  3. Run bundle inside the project root to install the gem dependencies.

  4. Run rake to build sproutcore-statechart.js. Two builds will be placed in the dist/ directory.

  5. sproutcore-statechart.js and sproutcore-statechart.min.js - unminified and minified builds of sproutcore-statechart.js

If you are building under Linux, you will need a JavaScript runtime for minification. You can either install nodejs or gem install therubyracer.

Running / Writing Unit Tests:

The repository has been refactored to use the same structure as the Ember.js project:

  1. To start the development server, run bundle exec rackup.

  2. Then visit: http://localhost:9292/tests/index.html?package=all

You can also pass jquery=VERSION in the test URL to test different versions of jQuery. Default is 1.7.1.

Features / Problems:

  • The stateObserves() helper does not properly work with global paths. These problems are captured in the unit tests
  • There are a few fixes for bugs that are in the SproutCore 1.x version that have not been ported over as of yet.
  • The Unit Tests for route triggered are failing at the moment, but it works -> needs to be fixed!

If you run into a problem, please file an issue on this repository.

Requirements:

In order to use the Statechart package, you'll need two libraries:

These dependencies are automatically installed if you're using BPM. If you want to download and use the JS file (and assuming you're already using SproutCore 2.0), don't forget to grab the built version of the Utils package.

You can also simply include a built version of Ember.js before ember-statechart.js

Install:

You can use the Statechart package by either downloading the JavaScript files provided in the Downloads section of this repository or using BPM. To install it via BPM, simply run

bpm add sproutcore-statechart

And this will handle adding all of its dependencies as well. You, of course, need to be using BPM for your application or package for this to work ;)

sproutcore-statechart's People

Contributors

benjixx avatar colincampbell avatar ebryn avatar krisselden avatar lukemelia avatar mlcohen avatar oruen avatar pklingem avatar stevenh512 avatar tbartelmess avatar wycats avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.