-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathmain.js
31 lines (25 loc) · 949 Bytes
/
main.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
define(function (require, exports, module) {
// Brackets modules
var AppInit = brackets.getModule("utils/AppInit"),
ExtensionUtils = brackets.getModule("utils/ExtensionUtils");
// Local modules
var Promise = require("bluebird"),
SnippetWidget = require("src/SnippetWidget"),
Snippets = require("src/Snippets");
// Load CodeMirror runMode
brackets.getModule(["thirdparty/CodeMirror2/addon/runmode/runmode"], $.noop, function (err) {
console.error(err);
});
// Bluebird config
Promise.onPossiblyUnhandledRejection(function (e/*, promise*/) {
if (e != null) { throw e; }
});
// Extension initialisation
AppInit.appReady(function () {
// Load the style sheet
ExtensionUtils.loadStyleSheet(module, "styles/main.less");
// Init the extension modules
SnippetWidget.init();
Snippets.init();
});
});