grove

JS core tools for Pebbles apps using Grove

Grove.js

Core javascript library for Pebbles-applications using Grove

Install node and npm

$ sudo port install node
$ sudo port install npm

Install module dependencies

$ npm install

Run tests

$ node_modules/.bin/mocha

... something something ...

Registering your models with GrovePost will let it automatically instantiate the correct models for each item when you load collections.

E.g.:

class Issue extends grove.GrovePost
  klass: "post.issue"
  initialize: (attributes) ->
    @tag("unresolved")
  newMessage: (attributes) ->
    @newChild("post.message", attributes)
  newLogEntry: (attributes) ->
    @newChild("post.log_entry", attributes)
  setResolved: ->
    @untag("unresolved")
    @save()
 
grove.GrovePost.registerModel(core.Issue)