-
Notifications
You must be signed in to change notification settings - Fork 0
/
rapture.js
60 lines (40 loc) · 1.15 KB
/
rapture.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
define(function(require, exports, module) {
main.consumes = [
"Plugin", "ace"
];
main.provides = ["rapture"];
return main;
function main(options, imports, register) {
var Plugin = imports.Plugin;
var ace = imports.ace;
var plugin = new Plugin("Ajax.org", main.consumes);
var loaded = false;
function load() {
if (loaded) {return false;}
loaded = true;
ace.defineSyntax({
id: 'rapture',
name: 'rapture',
caption: 'Rapture',
extensions: 'r|rh'
});
}
/***** Lifecycle *****/
plugin.on("load", function() {
load();
});
plugin.on("enable", function() {
});
plugin.on("disable", function() {
});
plugin.on("unload", function() {
loaded = false;
});
/***** Register and define API *****/
plugin.freezePublicAPI({
});
register(null, {
rapture: plugin
});
}
});