fix(javascript): use top-level node_modules in monorepos
This commit is contained in:
parent
98f3af7a7c
commit
89e444ef85
1 changed files with 2 additions and 1 deletions
|
@ -34,7 +34,8 @@ ignore the cache."
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +javascript-add-npm-path-h ()
|
(defun +javascript-add-npm-path-h ()
|
||||||
"Add node_modules/.bin to `exec-path'."
|
"Add node_modules/.bin to `exec-path'."
|
||||||
(when-let ((node-modules-parent (locate-dominating-file default-directory "node_modules/"))
|
(when-let ((search-directory (or (doom-project-root) default-directory))
|
||||||
|
(node-modules-parent (locate-dominating-file search-directory "node_modules/"))
|
||||||
(node-modules-dir (expand-file-name "node_modules/.bin/" node-modules-parent)))
|
(node-modules-dir (expand-file-name "node_modules/.bin/" node-modules-parent)))
|
||||||
(make-local-variable 'exec-path)
|
(make-local-variable 'exec-path)
|
||||||
(add-to-list 'exec-path node-modules-dir)
|
(add-to-list 'exec-path node-modules-dir)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue