Implement bootstrap functionality + make bootstrap (WIP)
This commit is contained in:
parent
de08d0a2db
commit
804aba93f5
7 changed files with 131 additions and 24 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue