Skip to content
Adds the node_modules/.bin directory to the buffer exec_path. E.g. support project local eslint installations.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Sep 6, 2016
LICENSE Initial commit Sep 6, 2016
README.md Add the melpa badge in README Nov 8, 2017
add-node-modules-path.el fix: does not work with buffers that have no backing file (#14) Jul 10, 2018

README.md

add-node-modules-path

MELPA

This file provides add-node-modules-path, which searches the current files parent directories for the node_modules/.bin/ directory and adds it to the buffer local exec-path. This allows Emacs to find project based installs of e.g. eslint.

Usage

M-x add-node-modules-path

To automatically run it when opening a new buffer: (Choose depending on your favorite mode.)

(eval-after-load 'js-mode
  '(add-hook 'js-mode-hook #'add-node-modules-path))
You can’t perform that action at this time.