Home About GitHub Blog
October 25, 2016

Clojure - Figwheel

I suggest taking a look at lein-figwheel. The amazing thing about figwheel is that it can reload CSS, JavaScript and ClojureScript and as well as identify sources of error in your code.

Figwheel is a pretty cool for a lot of reasons. One reason for that is that it allows you to do some awesome front end work. How is that because Figwheel allows you to load your code right into the browser while you are coding and see changes in your code stright onto the browser which is simply just amazing. If you haven't done so or have no idea of what I am talking about your in for a treat. I will show you the amazing power that is figwheel.

The first time I used Figwheel I was pretty blown away by the concept of it and once you have it you will definitely be wondering why coding isn't like this normally. It will definitely be more natural for you to code and you will see the instant result of writing your code instead of having to reload your browser which is simply not fun.

The creator of figwheel is bhauman who also has a nice flappy bird demo which you can play around with in figwheel.

$ git clone https://github.com/bhauman/flappy-bird-demo.git

Or start your very own project right away with figwheel by typing ...

$ lein new figwheel newfigwheel

Once you have that cd into that directory and run the following to get figwheel working.

$ lein figwheel

Afterwards go ahead and open to the localhost 3449 if it doesn't do it for you but it should open it up for you. Note that now if you make changes to your code it'll reflect after you save the file and you don't even have to refresh the browser or anything like that which is pretty amazing.

While this is pretty cool to really put this into use you should probably learn some clojurescript which is a good thing to learn specially if your interested in making web apps which will an extremely useful tool. But more on that on another date. For now I just wanted to introduce you to the awesome power of figwheel.

Tags: Clojure Code Guide