grove

JS core tools for Pebbles apps using Grove

npm install grove
5 downloads in the last month

Grove.js

Core javascript library for Pebbles-applications using Grove

Getting started

Install node and npm

$ sudo port install node
$ sudo port install npm

Install module dependencies

$ npm install

Run tests

$ node_modules/.bin/mocha

Usage

... something something ...

Adding new grove models

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)
npm loves you