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
3
votes
1 answer

How to set up atom editor for clojurescript development with figwheel?

It looks like the atom editor has a reasonable degree of clojure and clojurescript support through various packages. Does anyone have a recommended way to configure it to use figwheel? Clearly this is possible using a separate terminal, but I'm…
grumplet
  • 285
  • 2
  • 14
3
votes
1 answer

lein-less not running on figwheel start or when a .less file changes

I'm trying to setup a clojurescript project that uses the lein-less plugin to compile .less files. I should say I'm new to clojurescript. The problem is that it doesn't seem to run. It doesn't run when I run "lein figwheel" and neither when I change…
Vlad
  • 385
  • 2
  • 13
3
votes
1 answer

'figwheel' is not a task

I was happily using figwheel all day. I terminated the process by entering :cljs/quit. When I try to restart figwheel lein figwheel, I'm greeted with this message from leiningen: 'figwheel' is not a task. See 'lein help' Running lein help lists…
detran
  • 373
  • 2
  • 12
2
votes
0 answers

Figwheel / unable to declare a :ring-handler

My clojure/reagent project was initiated using a static resources/public/index.html, where src/test/client.cljs provides the rendering function. Now I would like to switch the server side to a dynamic renderer (in order to provide a REST API to the…
Francois
  • 2,005
  • 21
  • 39
2
votes
1 answer

figwheel doesn't start in reagent project on windows7

I'm trying to run figwheel for reagent project: lein new reagent app cd app lein figwheel After that I'm receiving following output: Could not transfer artifact org.apache.commons:commons-compress:pom:1.3 from/to central…
Karen Fisher
  • 747
  • 1
  • 8
  • 25
2
votes
1 answer

React-native on Clojure - Get the ScrollView by id and scrollTo a view inside the ScrollView

I have a map with a list of markers. I have also a list of views (containing the details of marked items) inside a ScrollView below the map. When I click on a marker inside map, I need to scroll down to a particular view inside the…
Tessy Thomas
  • 1,475
  • 12
  • 19
2
votes
1 answer

:npm-deps fails "node" not found

I'm trying to use the new :npm-deps feature of the clojurescript compiler to include a React-Helmet component (https://github.com/nfl/react-helmet). Relevant snippet of the "dev" build: :compiler {:main "app.ui.core" :output-to…
fbielejec
  • 3,492
  • 4
  • 27
  • 35
2
votes
1 answer

Difference between figwheel and (watch and reload)

I am trying to learn clojurescript by building a desktop application. The boot configuration I am working with as follows: (def +name+ "visivo/desktop") (def +version+ "0.0.1-SNAPSHOPT") (def +description+ "Desktop application for visivo") (def…
pntripathi9417
  • 258
  • 1
  • 11
2
votes
1 answer

How can I get figwheel to reload a website when a checkout dependency changes?

I'm working on two related web applications that both depend on a third local project for the code they have in common. How can I get figwheel to rebuild and reload the code when the checkout dependency is edited?
shader
  • 801
  • 1
  • 7
  • 25
2
votes
1 answer

How to debug the `figwheel-sidecar` project?

How can the figwheel-sidecar project be running on my own machine with my Emacs so I can debug into it? I tried to cider-jack-in, it works, but how to let the clojurescript project depends on it and let Emacs run the local version of…
cmal
  • 2,062
  • 1
  • 18
  • 35
2
votes
1 answer

Use Node.js library from ClojureScript project

I'm trying to use a Node.js based component (https://github.com/leandrowd/react-responsive-carousel) in my Figwheel-based ClojureScript app. Unfortunately I cannot find a "standalone", packaged Javascript file with react-responsive-carousel. Since…
Blacksad
  • 14,906
  • 15
  • 70
  • 81
2
votes
0 answers

inject figwheel's or boot's cljs-repl to arbitrary webpages

Could the leiningen plug-in figwheel or boot's counterpart be used within arbitrary webpages? I'm thinking of it as an replacement of the browser's builtin developer console. Here is a simple scenario of how I'd imagine this workflow: You open an…
Anton Harald
  • 5,772
  • 4
  • 27
  • 61
2
votes
2 answers

Figwheel not hot reloading or updating on file save when using vagrant

When running figwheel from with a vagrant box it seems that file changes aren't noticed and as a result figwheel does not update/reload the page.
royalaid
  • 913
  • 1
  • 8
  • 14
2
votes
1 answer

How can I make figwheel start with a custom initial namespace?

The project.clj of my clojurescript code specifies :repl-options {:init-ns my-project.core} and I start figwheel via start-figwheel!. In the figwheel documentation it says that ;; you can also just call (ra/start-figwheel!) ;; and figwheel will do…
synthetic
  • 23
  • 5
2
votes
1 answer

How do I run cljs.test cases from a test directory in the figwheel repl?

I'm trying to get started with a unit-tested clojurescript project, based on the figwheel quickstart, but with some tests added. I tried, successfully, to add a basic cljs.test case (test-numbers from the cljs.test doc) directly into my main file,…
traffichazard
  • 1,247
  • 1
  • 9
  • 13