// my dojoConfig defined aliases to the packages I use (dojo, dmidz)
// so in dmidz/my-module.js
define(['dojo/dom-construct'], function(cons){// requiring some dojo module
cons.// <- oh it is nicely displaying list of dom-construct module methods
});
这是我所知道的最适合这项工作的工具。不过,Tern 非常需要 RAM(与纯文本编辑器相比)。
与 Sublime Text 的集成是无缝的,与其他 Sublime 插件一起,您可以使其非常接近 IDE 的定义。
以下是 TernJS 文档的摘录:
Tern is a stand-alone code-analysis engine for JavaScript. It is
intended to be used with a code editor plugin to enhance the editor's
support for intelligent JavaScript editing. Features provided are:
Autocompletion on variables and properties
Function argument hints
Querying the type of an expression
Finding the definition of something
Automatic refactoring
Tern is open-source (MIT license), written in JavaScript, and capable
of running both on node.js and in the browser. Editor plugins
There is currently Tern support for the following editors: