File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 3131
3232; ;; Code:
3333
34+ ;;;### autoload
35+ (defvar add-node-modules-path-debug nil
36+ " Enable verbose output when non nil." )
37+
3438;;;### autoload
3539(defun add-node-modules-path ()
40+ " Search the current buffer's parent directories for `node_modules/.bin`.
41+ If it's found, then add it to the `exec-path' ."
3642 (let* ((root (locate-dominating-file
3743 (or (buffer-file-name ) default-directory)
3844 " node_modules" ))
4248 (progn
4349 (make-local-variable 'exec-path )
4450 (add-to-list 'exec-path path)
45- (message " added node_modules to exec-path " ))
46- (message " node_modules not found " ))))
51+ (when add-node-modules-path-debug
52+ (message (concat " added " path " to exec-path" ))))
53+ (when add-node-modules-path-debug
54+ (message (concat " node_modules not found in " root))))))
4755
4856(provide 'add-node-modules-path )
4957
You can’t perform that action at this time.
0 commit comments