GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - codesuki/add-node-modules-path: Adds the node_modules/.bin directory to the buffer exec_path. E.g. support project local eslint installations.

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
test
test
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
add-node-modules-path.el
add-node-modules-path.el
 
 

Repository files navigation

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))

Monorepo Support

In a monorepo scenario it might make sense to add multiple directories. To achieve this, additional commands can be specified:

(use-package add-node-modules-path
  :custom
  (add-node-modules-path-command '("pnpm bin" "pnpm bin -w"))) 

About

Adds the node_modules/.bin directory to the buffer exec_path. E.g. support project local eslint installations.

Topics

emacsexec-pathnodenode-modulespath

Resources

Readme
MIT license
Activity

Stars

146 stars

Watchers

2 watching

Forks

17 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.