A hyperclick provider that lets you jump to where variables are defined.
This project was created primarily to assist navigating projects that use many small modules. This project solves some of my problems and I share it in the hope that it solves some of yours.
What is js-hyperclick?
imports, exports, requires, identifiers (variables), and scopes. Using this
information it can locate the origin of any identifier. It does not and will not
track properties (ex.
identifier.property), see below for more info.
If you have configured your project to avoid
../ in your imports, you can
configure js-hyperclick using
moduleRoots in your
configuration belongs there and not in Atom because it is specific to your
For most use cases, you just need to specify the folders to search.
If you want
import 'foo' to resolve to
src/lib/foo, just drop this in your
"moduleRoots": [ "src/lib" ],
If you're using something more advanced like module aliases you can implement
your own custom resolver. Instead of pointing
moduleRoots to a folder, just
require() and use it *.
js-hyperclick doesn't use these kinds of features in practice, I have
configured them as an example and to validate functionality.
Custom Resolver Security
Custom resolvers run inside Atom and extend the functionality of
js-hyperclick. This means there is some risk that you could checkout a project
that contains a malicious custom resolver. In order to mitigate this risk, when
js-hyperclick encounters a new resolver it will open it and ask if you want to
trust it. Whether you trust or distrust the resolver,
that hash so you don't get prompted when switching between branches of a
project, or if you have use the exact same resolver code across multiple
otherfile.js instead of
There is a setting in
js-hyperclick to add additional extensions. My
.js, .jsx, .coffee. This does not cause js-hyperclick to scan
CoffeeScript. This will just locate them if you require the file without the
Can you add support for
No, There is no way to know for sure what
this is or what properties it might
have. Instead of trying to pick some set of patterns to support and get partly
right, I'm just not going to support that at all.
Will you support AMD?
I just don't see a future in AMD, so I won't invest time in supporting it. I used RequireJS for years