-
Notifications
You must be signed in to change notification settings - Fork 0
/
vandyke.js
39 lines (29 loc) · 973 Bytes
/
vandyke.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
;(function (root, factory) {
if (typeof exports === 'object') {
// CommonJS
factory(require, exports, module);
} else if (typeof define === 'function' && define.amd) {
// AMD
define(['require', 'exports', 'module', './mixin', './runtime'], factory);
} else {
console && console.error('Unsupported module environment.'); // jshint ignore:line
}
}(this, function (require, exports, module) {
'use strict';
var Mixin = require('./mixin'),
Runtime = require('./runtime'),
VanDyke;
// Create the vandyke class
VanDyke = Runtime.extend({}, {
Mixin: Mixin,
Runtime: Runtime,
// Shortcut to create a mixin
mixin: function (React) {
// Initialize a mixin including the default runtime
this.Runtime(React);
this.Mixin(Runtime);
return new this.Mixin();
}
});
module.exports = VanDyke;
}));