-
Notifications
You must be signed in to change notification settings - Fork 1
/
output.js
70 lines (57 loc) · 1.21 KB
/
output.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
*
* Built with THE MANSION
* Part of the BLYSK project
* http://bly.sk || http://github.com/blysk
*
**/
(function(){
"use strict"
try{
//#export foo
var fooModule = (function foo() {
/*************************
** PRIVATE **
*************************/
//constans
var FOO = 0xFF;
//variables
var text = 'It\'s alive!';
/*************************
** PUBLIC **
*************************/
//logic of public functions in here
var fuu = function foo_foo(){
return text;
}
//and references here:
return {
fuu: fuu
}
})();
//#export bar
//imported modules
//#import foo
var barModule = (function bar(foo) {
/*************************
** PUBLIC **
*************************/
//logic of public functions in here
var checkMe = function bar_checkMe(){
alert(foo.fuu());
}
//and references here:
return {
checkMe: checkMe
}
})(fooModule);
//#export main
//imported modules
//#import bar
var mainModule = (function main(bar) {
window.addEventListener('load', function(){
bar.checkMe();
}, false);
})(barModule);
} catch (e) { console.error(e); }
})();