diff --git a/devtools/client/sourceeditor/tern/README b/devtools/client/sourceeditor/tern/README index 90dfd0b04680..d41e7b456454 100644 --- a/devtools/client/sourceeditor/tern/README +++ b/devtools/client/sourceeditor/tern/README @@ -8,3 +8,6 @@ Tern is a stand-alone code-analysis engine for JavaScript. It is intended to be Currently used version is 0.6.2. To upgrade, download the latest release from http://ternjs.net/, and copy the files from lib/ into this directory. You may also need to update the CodeMirror plugin found in devtools/client/sourceeditor/codemirror/addon/tern, but it will most likely work without updating. + +Replace instances of `require("acorn")` with `require("acorn/acorn")` +Replace instances of `acorn/dist/` with `acorn/` \ No newline at end of file diff --git a/devtools/client/sourceeditor/tern/infer.js b/devtools/client/sourceeditor/tern/infer.js index b4a118bbe759..94f0a9518c6e 100755 --- a/devtools/client/sourceeditor/tern/infer.js +++ b/devtools/client/sourceeditor/tern/infer.js @@ -14,10 +14,10 @@ (function(root, mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS - return mod(exports, require("acorn"), require("acorn/dist/acorn_loose"), require("acorn/dist/walk"), + return mod(exports, require("acorn/acorn"), require("acorn/acorn_loose"), require("acorn/walk"), require("./def"), require("./signal")); if (typeof define == "function" && define.amd) // AMD - return define(["exports", "acorn/dist/acorn", "acorn/dist/acorn_loose", "acorn/dist/walk", "./def", "./signal"], mod); + return define(["exports", "acorn/acorn", "acorn/acorn_loose", "acorn/walk", "./def", "./signal"], mod); mod(root.tern || (root.tern = {}), acorn, acorn, acorn.walk, tern.def, tern.signal); // Plain browser env })(this, function(exports, acorn, acorn_loose, walk, def, signal) { "use strict"; diff --git a/devtools/client/sourceeditor/tern/tern.js b/devtools/client/sourceeditor/tern/tern.js index 82784e351e59..327797174744 100755 --- a/devtools/client/sourceeditor/tern/tern.js +++ b/devtools/client/sourceeditor/tern/tern.js @@ -7,9 +7,9 @@ (function(root, mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS return mod(exports, require("./infer"), require("./signal"), - require("acorn"), require("acorn/dist/walk")); + require("acorn/acorn"), require("acorn/walk")); if (typeof define == "function" && define.amd) // AMD - return define(["exports", "./infer", "./signal", "acorn/dist/acorn", "acorn/dist/walk"], mod); + return define(["exports", "./infer", "./signal", "acorn/acorn", "acorn/walk"], mod); mod(root.tern || (root.tern = {}), tern, tern.signal, acorn, acorn.walk); // Plain browser env })(this, function(exports, infer, signal, acorn, walk) { "use strict";