2015-09-28 14:33:20 +03:00
|
|
|
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
|
|
|
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2016-03-18 08:26:53 +03:00
|
|
|
/* global requirejs */
|
|
|
|
|
|
|
|
"use strict";
|
2015-09-28 14:33:20 +03:00
|
|
|
|
2017-11-28 18:28:21 +03:00
|
|
|
// Send readyState change notification event to the window. It's useful for tests.
|
|
|
|
JSONView.readyState = "loading";
|
|
|
|
window.dispatchEvent(new CustomEvent("AppReadyStateChange"));
|
|
|
|
|
2015-09-28 14:33:20 +03:00
|
|
|
/**
|
|
|
|
* RequireJS configuration for JSON Viewer.
|
|
|
|
*
|
2017-06-03 21:58:00 +03:00
|
|
|
* ReactJS library is shared among DevTools. The minified (production) version
|
|
|
|
* of the library is always available, and is used by default.
|
2015-09-28 14:33:20 +03:00
|
|
|
*
|
|
|
|
* In order to use the developer version you need to specify the following
|
|
|
|
* in your .mozconfig (see also bug 1181646):
|
|
|
|
* ac_add_options --enable-debug-js-modules
|
|
|
|
*
|
2016-01-15 16:15:28 +03:00
|
|
|
* React module ID is using exactly the same (relative) path as the rest
|
|
|
|
* of the code base, so it's consistent and modules can be easily reused.
|
2015-09-28 14:33:20 +03:00
|
|
|
*/
|
|
|
|
require.config({
|
2017-06-08 12:52:46 +03:00
|
|
|
baseUrl: "resource://devtools-client-jsonview/",
|
2015-09-28 14:33:20 +03:00
|
|
|
paths: {
|
2017-06-08 12:52:46 +03:00
|
|
|
"devtools/client/shared": "resource://devtools-client-shared",
|
2016-10-19 20:20:49 +03:00
|
|
|
"devtools/shared": "resource://devtools/shared",
|
2017-06-03 21:58:00 +03:00
|
|
|
"devtools/client/shared/vendor/react":
|
|
|
|
JSONView.debug
|
2017-06-08 12:52:46 +03:00
|
|
|
? "resource://devtools-client-shared/vendor/react-dev"
|
2017-09-14 15:32:06 +03:00
|
|
|
: "resource://devtools-client-shared/vendor/react",
|
|
|
|
"devtools/client/shared/vendor/react-dom":
|
|
|
|
JSONView.debug
|
|
|
|
? "resource://devtools-client-shared/vendor/react-dom-dev"
|
|
|
|
: "resource://devtools-client-shared/vendor/react-dom",
|
2017-11-03 16:34:41 +03:00
|
|
|
"devtools/client/shared/vendor/react-prop-types":
|
|
|
|
JSONView.debug
|
|
|
|
? "resource://devtools-client-shared/vendor/react-prop-types-dev"
|
|
|
|
: "resource://devtools-client-shared/vendor/react-prop-types",
|
2015-09-28 14:33:20 +03:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// Load the main panel module
|
|
|
|
requirejs(["json-viewer"]);
|