Releases: dependents/Dependents
Using the mouse to jump to a dependency
Using the mouse to jump to a dependency
- Create a new (or modify existing if you have one)
.sublime-mousemap
file:
Windows - create
Default (Windows).sublime-mousemap
in%appdata%\Sublime Text 3\Packages\User
Linux - create
Default (Linux).sublime-mousemap
in~/.config/sublime-text-3/Packages/User
Mac - create
Default (OSX).sublime-mousemap
in~/Library/Application Support/Sublime Text 3/Packages/User
- Add the following binding
[
{
"button": "button1",
"count": 1,
"modifiers": ["super", "alt"],
"press_command": "drag_select",
"command": "dependents",
"args": {
"root": "public/assets/js",
"mode": "dependency"
}
}
]
- Note: You do not need the opening/closing square brackets [] if you are modifying an existing
.sublime-mousemap
file.
- Modify the root according to the location of JS files in your codebase
Now, you can hold down CMD + Option and Click on the path of a dependency to jump to that file!
Jump to a module
New Feature
Jump to the module under your cursor
How to activate it:
- Add the new key binding below to Preferences -> Key Bindings - User
- Change the "root" within the key binding if you need to
- Within a JS file, place your cursor over the dependency path you want to go to
- Press cmd + option + right (or the key combination you defined) to jump to that file
New key binding
Add this as a new key binding in Preferences -> Key Bindings - User:
{
"keys": ["super+alt+right"],
"command": "dependents",
"args": {
"root": "public/assets/js",
"mode": "dependency"
}
}
- This key binding should not replace the key binding you have for finding the dependents
Upgrade node-dependents
Bugfix for dynamic requires: dependents/node-dependents#5
Changelogs and notice to upgrade dependents
v1.0.8 Changelogs and notice to upgrade node tool
Show an error message is node-dependents is not installed
v1.0.7 Show a warning if node-dependents is not installed
Readme fix
v1.0.6 Typo
Fix node dependency name
The prerequisite node tool should be installed via npm install dependents
.
It was previously, incorrectly stated as npm install node-dependents
, which does not exist on npm. Thanks to @amatiasq for the heads up.
User Experience Tweak
If there's only one dependent for the current file, jump to that file directly – don't waste time showing the quick panel.
If there are multiple dependents, then show the quick panel.
Minor tweaks
- Code cleanup
- Error handling for issuing dependents command on files not within the root
- Removing the root from the filename of the dependents shown in the quick panel
Installation instructions
v1.0.2 Installation instructions