-
Notifications
You must be signed in to change notification settings - Fork 12
/
main.js
33 lines (26 loc) · 1.12 KB
/
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
32
33
/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */
/*global define, $, brackets, window, Worker */
define(function (require, exports, module) {
'use strict';
require(['text!config.json'], function (configText) {
var AppInit = brackets.getModule('utils/AppInit'),
ExtensionUtils = brackets.getModule('utils/ExtensionUtils'),
config = JSON.parse(configText),
baseUrl = config.isDebug ? './built/' : './bin/';
ExtensionUtils.loadStyleSheet(module, 'style.css');
require([baseUrl + 'main'], function (init) {
var initConfig = {
logLevel: config.logLevel,
typeScriptLocation: require.toUrl('./third_party/typescript/lib.d.ts'),
workerLocation: require.toUrl(baseUrl + 'worker.js')
};
AppInit.appReady(function () {
try {
init(initConfig);
} catch(e) {
console.error(e.stack);
}
});
});
});
});