mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Implement bootstrap functionality + make bootstrap (WIP)
This commit is contained in:
@ -14,3 +14,23 @@
|
||||
(when (featurep! :feature jump)
|
||||
(package! xref-js2))
|
||||
|
||||
;;
|
||||
(def-bootstrap! javascript
|
||||
(unless (cl-every 'executable-find '("node" "npm" "tern"))
|
||||
(pcase (doom-system-os)
|
||||
('arch
|
||||
(let (progs)
|
||||
(unless (executable-find "node") (push "nodejs" progs))
|
||||
(unless (executable-find "npm") (push "npm" progs))
|
||||
(when progs
|
||||
(sudo "pacman --noconfirm -S %s" progs))))
|
||||
('debian) ;; TODO
|
||||
('macos
|
||||
(unless (executable-find "node")
|
||||
(sh "brew install node"))))
|
||||
(unless (executable-find "node")
|
||||
(error "Failed to install NodeJS"))
|
||||
(unless (executable-find "tern")
|
||||
(funcall (if (file-writable-p (executable-find "npm")) 'sh 'sudo)
|
||||
"npm -g install tern"))
|
||||
t))
|
||||
|
Reference in New Issue
Block a user