HOME

javascript-init

Javascript

Node.js Set-up

For REPLs and such, because actually writing server-side code in Javascript is insane.

(setenv "NODE_PATH" "~/node_modules")
(setq inferior-js-program-command "env NODE_NO_READLINE=1 node")

Js-Mode

(require-package 'js-comint)

(eval-after-load "js-mode"
  '(progn
     (add-hook 'js-mode-hook
               (lambda ()
                 (glasses-mode t)
                 (setq mode-name "Js")))
     (require 'js-comint)))

(defun jslint-thisfile ()
  (interactive)
  (compile (format "jsl -process %s" (buffer-file-name))))
(provide 'javascript-init)

Author: Toby Tripp

Created: 2015-02-04 Wed 10:41

Emacs 24.3.1 (Org mode 8.2.10)

Validate