jcollard / elm-mode

Elm mode for emacs
GNU General Public License v3.0
375 stars 67 forks source link

Compiling buffer with --output filename #32

Closed ghost closed 9 years ago

ghost commented 9 years ago

I can see that the interactive functions support passing an OUTPUT file name for compilation, but not sure how to use it. Coming a buffer always yields "elm.js" rather than "<buffer/file-name>.js"...

Bogdanp commented 9 years ago

This will be coming in a future release but isn't yet exposed in a nice way. To work around it you could temporarily write your own interactive function that wraps one of the compilation functions for example:


(defun my-elm-compile-buffer (output)
  (interactive "F")
  (elm-compile--file (elm--buffer-local-file-name) output))
ghost commented 9 years ago

Thanks. I'll do that.