Hoodie is a offline first web framework that allows you to develop applications as if there were no backend.
hoodie install <plugin>
Plugins are just npm modules whose names begin with hoodie-plugin-
var store = hoodie.open("hoodie-plugin-plugins")
store.connect()
store.findAll("plugin").done(function (plugins) {
// Render, or whatever
})
var html = '<ul>{{#todos}}<li>{{title}}</li>{{/todos}}</ul>'
hoodie.reactive($('#todolist'), html, function (store) {
var defer = hoodie.defer()
store.findAll('todo').done(function (todos) {
defer.resolve({todos: todos})
})
return defer.promise()
})
hoodie.<plugin>.js
Hoodie.extend(function (hoodie) {
// Init, attach methods to hoodie etc. etc.
})
index.js
module.exports = function (hoodie, cb) {
// Init, when done, call `cb`
}