UNPKG

derby

Version:

MVC framework making it easy to write realtime, collaborative applications that run in both Node.js and browsers.

54 lines (53 loc) 2.03 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.DerbyForClient = exports.Derby = void 0; /* * Derby.js * Meant to be the entry point for the framework. * */ var racer_1 = require("racer"); var App_1 = require("./App"); var components_1 = require("./components"); var Page_1 = require("./Page"); var Derby = /** @class */ (function (_super) { __extends(Derby, _super); function Derby() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.Component = components_1.Component; return _this; } return Derby; }(racer_1.Racer)); exports.Derby = Derby; var DerbyForClient = /** @class */ (function (_super) { __extends(DerbyForClient, _super); function DerbyForClient() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.App = App_1.AppForClient; _this.Page = Page_1.PageForClient; return _this; } DerbyForClient.prototype.createApp = function (name, filename, options) { return new this.App(this, name, filename, options); }; return DerbyForClient; }(Derby)); exports.DerbyForClient = DerbyForClient; if (!racer_1.util.isServer) { module.require('./documentListeners').add(document); }