Bug 1196047 - Move tern to client/sourceeditor. r=bgrins

This commit is contained in:
J. Ryan Stinnett 2015-10-07 17:28:06 -05:00
parent edf9f6eeee
commit 9b6e04dfc0
18 changed files with 15 additions and 17 deletions

View File

@ -31,12 +31,12 @@ function initializeAutoCompletion(ctx, options = {}) {
Editor.keyFor("autocompletion", { noaccel: true });
if (ed.config.mode == Editor.modes.js) {
let defs = [
"tern/browser",
"tern/ecma5",
"./tern/browser",
"./tern/ecma5",
].map(require);
CM_TERN_SCRIPTS.forEach(ed.loadScript, ed);
win.tern = require("tern/tern");
win.tern = require("./tern/tern");
cm.tern = new CodeMirror.TernServer({
defs: defs,
typeTip: function(data) {

View File

@ -4,6 +4,10 @@
# 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/.
DIRS += [
'tern',
]
DevToolsModules(
'autocomplete.js',
'css-autocompleter.js',

View File

@ -6,7 +6,7 @@
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
EXTRA_JS_MODULES.devtools.tern += [
DevToolsModules(
'browser.js',
'comment.js',
'condense.js',
@ -15,4 +15,4 @@ EXTRA_JS_MODULES.devtools.tern += [
'infer.js',
'signal.js',
'tern.js',
]
)

View File

@ -5,8 +5,8 @@
* Test that tern autocompletions work.
*/
const tern = require("tern/tern");
const ecma5 = require("tern/ecma5");
const tern = require("devtools/client/sourceeditor/tern/tern");
const ecma5 = require("devtools/client/sourceeditor/tern/ecma5");
function run_test() {
do_test_pending();

View File

@ -6,9 +6,9 @@
*/
function run_test() {
const tern = require("tern/tern");
const ecma5 = require("tern/ecma5");
const browser = require("tern/browser");
const tern = require("devtools/client/sourceeditor/tern/tern");
const ecma5 = require("devtools/client/sourceeditor/tern/ecma5");
const browser = require("devtools/client/sourceeditor/tern/browser");
do_check_true(!!tern);
do_check_true(!!ecma5);
do_check_true(!!browser);

View File

@ -2,7 +2,7 @@
tags = devtools
head = head_tern.js
tail =
skip-if = toolkit == 'android' || toolkit == 'gonk'
firefox-appdir = browser
[test_autocompletion.js]
[test_import_tern.js]

View File

@ -97,8 +97,6 @@ BuiltinProvider.prototype = {
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
"acorn/util/walk": "resource://gre/modules/devtools/acorn/walk.js",
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
"tern": "resource://gre/modules/devtools/tern",
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
"source-map": "resource://gre/modules/devtools/sourcemap/source-map.js",
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
// Allow access to xpcshell test items from the loader.
@ -146,7 +144,6 @@ SrcdirProvider.prototype = {
"Promise-backend.js"));
let acornURI = this.fileURI(OS.Path.join(sharedDir, "acorn"));
let acornWalkURI = OS.Path.join(acornURI, "walk.js");
let ternURI = OS.Path.join(sharedDir, "tern");
let sourceMapURI = this.fileURI(OS.Path.join(sharedDir,
"sourcemap", "source-map.js"));
this.loader = new Loader.Loader({
@ -166,8 +163,6 @@ SrcdirProvider.prototype = {
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
"acorn/util/walk": acornWalkURI,
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
"tern": ternURI,
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
"source-map": sourceMapURI,
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
},

View File

@ -22,7 +22,6 @@ DIRS += [
'sourcemap',
'shims',
'styleinspector',
'tern',
'touch',
'transport',
'webconsole',