Reputation: 2234
I am trying to code using a functional programming langauge called Elm. From various sources, I received recommendations to use Sublime and Cygwin. I successfully set up Cygwin such that I can enter elm commands and it works. But I would think there should be some way to set up Sublime such that I can write the code in Sublime.
My Question
Can Sublime Text 2 run Elm by itself? Do I need to link Cygwin to it somehow to permit Sublime to run Elm code? I just want Sublime to be able to accept the commands I input like any coding interface. How can I set up sublime to run the Elm commands like Cygwin does?
For reference, here's Elm's website: http://elm-lang.org/
Upvotes: 1
Views: 324
Reputation:
There should be no need to run Elm through Sublime Text - it's generally pretty simple to run the commands through the Command Prompt.
For development, all you should have to do is:
elm-reactor
in this Command Prompt (this takes the .elm files that it finds in the folder and converts them over to Javascript and Html, and also runs a server that allows you to view the results in the web browser)You should now be able to start developing. In the browser with localhost running, if you click on the wrench icon next to the file with your 'main' function the browser should update automatically when the files are changed (plus you get the time travelling debugger and other good stuff).
[*1] - you could start by jut copying over code from the Examples section of the Elm Lang website, then try modifying these to learn how it works, eg:
import Graphics.Element (..)
import Text (..)
main : Element
main =
plainText "Hello, World!"
Note:
elm-make
elm-package install <package_author>/<package_name>
(you can find these in the libraries section of the Elm site)Hope this helps! Elm's a lot of fun once you get started :)
Upvotes: 2