API Docs for: 0.9.0

ResourceStore Module

The ResourceStore manages information about the "resources" in a Mojito application. These resources are things that have representation on the filesystem.

You generally don't need to worry about this class (and its addons) unless you are extending Mojito.

Each resource can have many different versions. This is not talking about revisions, which is how the resource changes over time. It is instead talking about how there can be a version of the resource just for iphones, one just for android, a fallback, etc.

The metadata kept about each resource is normalized to the follow keys:

source (object)
where the source came from. (not shipped to the client.)
fs (object)
filesystem details
pkg (object)
packaging details
mojit (string)
which mojit this applies to, if any. ("shared" means the resource is available to all mojits.)
type (string)
resource type
subtype (string)
not all types of subtypes
name (string)
common to all versions of the resource
id (string)
unique ID. common to all versions of the resource. (typically {type}-{subtype}-{name}.)
yui (object)
for resources that are YUI modules
The following are only used in the metadata for each resource version (The metadata for resolved resources won't have these, since they're intrinsically part of the resolved resource.)
affinity (string)
runtime affinity. either server, client, or common
selector (string)
version selector

This module provides the following classes: