Matchbox
Matchbox is an Ember Data adapter for Firebase based on EmberFire. The goal is to have a seemless Ember Data experience. Other than data being updated automatically, you should not notice any other significant differences between a vanilla DS.Adapter and DS.FirebaseAdapter.
Usage
Download the production version or the development version.
Include in your web page after Ember and Ember Data:
<script src="ember.js"></script>
<script src="ember-data.js"></script>
<script src="matchbox.js"></script>Use the adapter in your application:
App.MyAdapter = DS.FirebaseAdapter.extend({
firebase: new Firebase("https://<my-firebase>.firebaseio.com/")
});Features
- Data will flow to Firebase on
Model.save() - Changes in Firebase will flow into Ember for records that are in the store using
store.find()andstore.findAll().
Developing
# Install dependencies
npm install
# Run tests
grunt test
# Automatically test as you develop
grunt dev
# Build new distribution version
grunt build
# Run server to test in browser without running tests in background
grunt serve
In order to run the tests against Matchbox you will need to add a firebase-config.js file to the tests directory. The file only needs to define window.firebaseURL which should be a writable Firebase endpoint.
window.firebaseURL = "https://<my-firebase>.firebaseio.com/";