Questions tagged [figwheel]

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding.

Features

  • Live code reloading: If you write reloadable code, figwheel can facilitate automated live interactive programming. Every time you save your ClojureScript source file, the changes are sent to the browser so that you can see the effects of modifying your code in real time.

  • Supports Node.js: You can use figwheel to live code ClojureScript in Node.js!

  • Static file server: The inclusion of a static file server allows you to get a decent ClojureScript development environment up and running quickly. For convenience there is a :ring-handler option so you can load a ring handler into the figwheel server.

  • Live CSS reloading: Figwheel will reload your CSS live as well.

  • Heads up display: Figwheel has a non-intrusive heads up display that gives you feedback on how well your project is compiling. By writing a shell script you can click on files in the heads up display and they will open in your editor!

  • Built-in ClojureScript REPL: When you launch figwheel it not only starts a live building/reloading process but it also optionally launches a CLJS REPL into your running application. This REPL shares compilation information with the figwheel builder, so as you change your code the REPL is also aware of the code changes. The REPL also has some special built-in control functions that allow you to control the auto-building process and execute various build tasks without having to stop and rerun lein-figwheel.

  • Robust connection: Figwheel's connection is fairly robust. I have experienced figwheel sessions that have lasted for days through multiple OS sleeps. You can also use figwheel like a REPL if you are OK with using print to output the evaluation results to the browser console.

  • Message broadcast: Figwheel broadcasts changes to all connected clients. This means you can see code and CSS changes take place in real time on your phone and in your laptop browser simultaneously.

  • Respects dependencies: Figwheel will not load a file that has not been required. It will also respond well to new requirements and dependency tree changes.

  • Calculates minimal reload set: Figwheel does its best to only reload what needs to be reloaded. This minimizes the surface area of dynamically reloaded code, which in turn should increase the stability of the client environment.

  • Doesn't load code that is generating warnings: If your ClojureScript code is generating compiler warnings Figwheel won't load it. This, again, is very helpful in keeping the client environment stable. This behavior is optional and can be turned off.

Source: [https://github.com/bhauman/lein-figwheel]

89 questions
2
votes
2 answers

How to run lein run and lein figwheel?

For a bit now I've just been running lein figwheel to start up my application. I generated the project using the luminus template. However, recently when connecting to a database I found that lein figwheel does not allow me to connect to database.…
2
votes
2 answers

Figwheel - Not reloading to browser (flappy-bird demo)

Just starting with Figwheel. I downloaded the demo app found here And it runs fine in the browser, except that it isn't reloading when I make changes and save the file. Tried different editors/different browsers, etc. I am cd'd into the directory, I…
1
vote
0 answers

Cannot get REPL prompt with figwheel-main and Clojure Tools

My goal is to have a ClojureScript REPL (targeting Node.js) using Figwheel and Clojure Tools (not Leiningen). But when I launch Figwheel it seems to start correctly but never completes. deps.edn {:deps {org.clojure/clojure {:mvn/version "1.11.1"} …
customcommander
  • 17,580
  • 5
  • 58
  • 84
1
vote
2 answers

Why this web application built with Clojure, ClojureSript, Figwheel, Lein is not been updated on the browser after editions on the source code?

I am watching a course/tutorial from Eric Normand on front-end. The course is a paid private service. However, he is using a public repo on GitHub, this one. After cloning and executing lein fig-dev, the project seems to have been succesfully…
Pedro Delfino
  • 2,421
  • 1
  • 15
  • 30
1
vote
1 answer

How to resolve Uncaught TypeError: clojure is undefined

I have done something to my clojurescript project which produces this error, I am using figwheel-main with deps.edn, not really sure what to look for to resolve this it sounds like clojurescript itself is not being found when run in a…
Oly
  • 370
  • 5
  • 16
1
vote
1 answer

Cannot get Leiningen commands to work with figwheel

After following the instruction set on https://leiningen.org/ to install Leiningen, I have managed to download the batch file and save it within a folder located in: C:\Users\Dylan\Bin\Lein.bat. I then ran lein.bat self-install in CMD, which…
Dylan
  • 53
  • 7
1
vote
1 answer

How To Run Clojurescript Unit Tests with Figwheel?

I'm attempting to use my figwheel REPL to run unit tests but I can't seem to get them to work. I've tried several different things, but each time I get a variety of errors usually related to not having (run-tests) defined. My test file is as…
newBieDev
  • 484
  • 3
  • 11
1
vote
2 answers

How to set up ClojureScript environment with Cursive and Figwheel?

I am trying to render some HTML in the browser using ClojureScript, but am not very close. So far I have installed: Clojure, leiningen, Figwheel, IntelliJ, Cursive. I would like to use reagent and re-frame. I have tried Chestnut (this is the closest…
Mr. Robot
  • 1,334
  • 6
  • 27
  • 79
1
vote
1 answer

Figwheel-main not connecting to websocket

I'm using linux in a ChromeOs, so to access my linux localhost I go to penguin.linux.test. I'm trying to setup figwheel-main, but I'm not able to set the websocket as penguin.linux.test instead of localhost. I'm getting the following in the…
Jp_
  • 5,973
  • 4
  • 25
  • 36
1
vote
1 answer

Compile production assets from clojurescript with figwheel

We currently use cljsbuild to compile our clojurescript source into the assets used in production, but during development, we use lein-figwheel. Both cljsbuild and figwheel are constantly watching for changes of the source and recompile when…
iGEL
  • 16,540
  • 11
  • 60
  • 74
1
vote
1 answer

Change Figwheel compile directory with Lein

I'm trying to move from lein-figwheel to figwheel-main and I'm using lein. By default figwheel-main compiles the build and puts it in target/public/cljs-out directory. However I wanted it to be in a different location resources/public/js/. I tried…
AKASH H C
  • 11
  • 2
1
vote
2 answers

How can I deploy a Reagent application, without needing Figwheel?

I wrote a web application in Reagent, and I develop and run it locally using Figwheel, which is great. Now I want to deploy it, so I ran "lein ring uberwar". It says "Compiling ClojureScript..." (3 times!), which sounds promising. But then when I…
1
vote
1 answer

How to place Clojurescript npm-deps in production setup?

this is a simple question, but I have been puzzling over it for a while now and it doesn't have much documentation to look at: I've got a development setup with ClojureScript, figwheel, npm deps working just fine for me. But when I produce a…
1
vote
2 answers

Figwheel environment variables

I understand Figwheel allows me to specify different builds. (Perhaps another way to think of them is as environments?) Based on the build/environment, I may require a different behavior in my code. For example, when in dev, I connect to a certain…
Dennis Hackethal
  • 13,662
  • 12
  • 66
  • 115
1
vote
1 answer

ClojureScript: Getting Figwheel REPL up and running

I am attempting to launch a figwheel repl for working in the browser. I get the following message when I point the browser to my local server: Figwheel Server: Resource not found Keep on figwheelin' The shell shows the following message, but it…
Selam S
  • 43
  • 3