mixdown-app
Mixdown app and base plugin implementation.
Create a Plugin
Plugins use the Resig Class extend pattern for injecting plugin interfaces.
var BasePlugin = Plugin; var HelloPlugin = BasePlugin; moduleexports = HelloPlugin;
- _setup: run plugin initialization
IMPORTANT: All values are converted to getter/setter functions. The extend pattern provides a much smaller and simpler interface for creating plugins, but the internals of BasePlugin and Class.extend() require that they are wrapped in order to persist the correct values.
The wrapped getter/setter looks like this for the above example. If val is passed, then the value is set. If not passed, then the value is simply returned.
;
Create an App
var App = App;var HelloPlugin = ; var app = ;app; console;//==> 0 console;//==> 'Hello Bill Murray' console;//==> 1 console;//==> 'Hello Bill Murray' console;//==> 2