1 | /*
|
2 | * Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
3 | *
|
4 | * Permission is hereby granted, free of charge, to any person obtaining a
|
5 | * copy of this software and associated documentation files (the "Software"),
|
6 | * to deal in the Software without restriction, including without limitation
|
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
8 | * and/or sell copies of the Software, and to permit persons to whom the
|
9 | * Software is furnished to do so, subject to the following conditions:
|
10 | *
|
11 | * The above copyright notice and this permission notice shall be included in
|
12 | * all copies or substantial portions of the Software.
|
13 | *
|
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
20 | * DEALINGS IN THE SOFTWARE.
|
21 | *
|
22 | */
|
23 |
|
24 | /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50, evil:true */
|
25 | /*global window, document */
|
26 |
|
27 | /**
|
28 | * Check for missing dependencies
|
29 | */
|
30 | window.setTimeout(function () {
|
31 | ;
|
32 | var deps = { "Mustache": window.Mustache, "jQuery": window.$, "RequireJS": window.require };
|
33 | var key, missingDeps = [];
|
34 | for (key in deps) {
|
35 | if (deps.hasOwnProperty(key) && !deps[key]) {
|
36 | missingDeps.push(key);
|
37 | }
|
38 | }
|
39 | if (missingDeps.length === 0) {
|
40 | return;
|
41 | }
|
42 | document.write("<h1>Missing libraries</h1>");
|
43 | document.write("<p>Oops! One or more required libraries could not be found.</p>");
|
44 | document.write("<ul>");
|
45 | missingDeps.forEach(function (key) {
|
46 | document.write("<li>" + key + "</li>");
|
47 | });
|
48 |
|
49 | document.write("</ul>");
|
50 | document.write("<p>If you're running from a local copy of the Brackets source, please make sure submodules are updated by running:</p>");
|
51 | document.write("<pre>git submodule update --init</pre>");
|
52 | document.write("<p>If you're still having problems, please contact us via one of the channels mentioned at the bottom of the <a target=\"blank\" href=\"../README.md\">README</a>.</p>");
|
53 | document.write("<p><a href=\"#\" onclick=\"window.location.reload()\">Reload Brackets</a></p>");
|
54 | }, 1000);
|