Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
While LiveScript provides a nice way to write our web-centric client code in a functional style, it still isn’t F#. It would be great if we could actually use real F# code to create that client-side JavaScript. This is where Pit comes in.
Pit was created by Fahad Suhaib and Karthik Vishnu and is built from the ground up in F#. It was first checked into GitHub in December 2011 and since it isn’t a fork of some predecessor, it’s the youngest of the options that I discuss in this chapter.
Let’s explore some of the benefits that Pit provides.
Pit provides a couple of different options for initiating compilation. The first option is to compile code by executing the Pit compiler with specific parameters via the command line (similar to how we compiled LiveScript). The second is to leverage the Visual Studio or MonoDevelop integration to create a project and allow that project to take care of passing the correct commands to the compiler. If you’re already using Visual Studio and/or MonoDevelop, this second option can make it very easy to get up and running. This also means there are no external dependencies such as Node.js.