Minor refactors across the board
- when-let* -> when-let - Fix projectile-locate-dominating-file for connected remote files
This commit is contained in:
parent
4ecf6c9414
commit
9a02bd8ac8
42 changed files with 114 additions and 110 deletions
|
@ -10,15 +10,15 @@ ignore the cache."
|
|||
(or (and (not refresh-p)
|
||||
(gethash project-root +javascript-npm-conf))
|
||||
(let ((package-file (expand-file-name "package.json" project-root)))
|
||||
(when-let* ((json (and (file-exists-p package-file)
|
||||
(require 'json)
|
||||
(json-read-file package-file))))
|
||||
(when-let (json (and (file-exists-p package-file)
|
||||
(require 'json)
|
||||
(json-read-file package-file)))
|
||||
(puthash project-root json +javascript-npm-conf))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +javascript-npm-dep-p (packages &optional project-root refresh-p)
|
||||
(when-let* ((data (and (bound-and-true-p +javascript-npm-mode)
|
||||
(+javascript-npm-conf project-root refresh-p))))
|
||||
(when-let (data (and (bound-and-true-p +javascript-npm-mode)
|
||||
(+javascript-npm-conf project-root refresh-p)))
|
||||
(let ((deps (append (cdr (assq 'dependencies data))
|
||||
(cdr (assq 'devDependencies data)))))
|
||||
(cond ((listp packages)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue