Dependents

Use any editor, master any codebase

Dependents

Currently supports JavaScript (AMD, CommonJS, and ES6) and CSS Preprocessor (Sass and Stylus) codebases.

  1. Installation
  2. Configuring Settings
  3. Usage
  4. Bindings
  5. Reporting an Issue
  6. Contributing to Dependents

Node.js Dependency

You must have Node.js installed on your system. Anything v0.10 and above is fine.

If you have issues with running Node.js from within the package see the node_path setting under configuring settings below.

Configuring settings

Put a .deprc file in the root directory of your project. See below for all possible settings.

At a minimum, you must specify a root or styles_root.

{
  "root": "path/to/all/js/files",
  "styles_root": "path/to/my/stylesheets",
  "require_config": "path/to/my/requirejs/config.js",
  "build_config": "path/to/requirejs/build.json",
  "webpack_config": "path/to/my/webpack.config.js",
  "exclude": ["jquery.js", "require.js", "vendor"]
}

General Settings

JavaScript Settings

CSS Settings

Usage

There are four ways to trigger the package’s commands

Jump to a dependency

Quickly jump to a file that the current file @imports (sass/stylus) or requires (js)

Jump to Dependency gif

  1. Within a file, place your cursor over the dependency path you want to go to
  2. Then trigger the Jump to dependency command in one of the four ways noted above.

For JavaScript if a dependency is aliased, you’ll need to supply the path to your requirejs or webpack configuration

Find the dependents of the current module

Dependents are files that immediately depend/require/import the current file.

Find Dependents gif

Trigger the Find dependents command in one of the four ways noted above.

You can also open all of the dependents at once:

  1. Within a file, right click to open up a menu
  2. Click on Dependents → Open all dependents to open all dependent files in the editor

Find relevant app entry points

Find relevant application entry points that depend on the current file somewhere within their dependency tree

  1. Within a file, right click to open the context menu
  2. Click on Dependents → Find relevant app entry points

You can also open all relevant app entry points at once via:

  1. Within a file, right click to open the context menu
  2. Click on Dependents → Open all relevant app entry points

View dependency tree

View a snapshot of the current file’s dependency tree (as a JSON file)

View Dependency Tree gif

  1. Within a file, right click to open the context menu
  2. Click on Dependents → View this file's dependency tree

Copy path to clipboard

Copy the rootless path of the current module to the clipboard. (JS and Sass)

Copy Path gif

For example, if the root is assets/js and the filename is path/to/assets/js/myFeature/file.js, then the command will copy myFeature/file to the clipboard.

This is useful when you want to include the current module as a dependency of another module.

  1. Within a file, right click to open the context menu
  2. Click on Dependents → Copy path to the clipboard

Or via its key binding. Please check with your editor integration of Dependents for key bindings.

Feel free to chat with me on Gitter if you need help or ping me @mrjoelkemp.