Questions tagged [cljsbuild]

Leiningen plugin to make ClojureScript development easy.

lein-cljsbuild

This is a Leiningen plugin that makes it quick and easy to automatically compile your ClojureScript code into Javascript whenever you modify it. It's simple to install and allows you to configure the ClojureScript compiler from within your project.clj file.

Beyond basic compiler support, lein-cljsbuild can optionally help with a few other things:

The latest version of lein-cljsbuild is 1.1.7. See the release notes here.

39 questions
2
votes
0 answers

Clojurescript Build with Modules - Constants Table Crashing

I'm building an app using: lein cljsbuild once min where my min config is {:id "min" :source-paths ["src"] :compiler {:output-dir "resources/public/js" :main app.core :optimizations :advanced :modules {:app …
Scott Klarenbach
  • 37,171
  • 15
  • 62
  • 91
2
votes
2 answers

Compile multiple cljs-files to independent js-files

Edit: In case someone tries to build independent cljs/js-files for one project: It works exactly the way described below. You just have to ensure the cljs-directories contain just the required files - it was my fault to leave unintentionally a copy…
2
votes
2 answers

I can't run a basic clojurescript.test sample

I'm trying to run a basic test with https://github.com/cemerick/clojurescript.test I've created a simple project such as: (defproject sampleproj "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :license…
Rafa de Castro
  • 2,474
  • 1
  • 24
  • 44
2
votes
1 answer

Locating unmatched delimiters in Clojurescript

Occasionally I find myself in a situation where I mismatch curly braces, parenthesis or square brackets: {}()[] in Clojurescript. I am using leininingen and cljsbuild I have a hard time tracking down the error source. Usually it boils down to…
wirrbel
  • 3,173
  • 3
  • 26
  • 49
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
1 answer

lein cljsbuild fails with untraceable error. How do you troubleshoot cljsbuild errors?

I do not see any log file for the compilation and the error in the terminal is insufficient for me to troubleshoot further. How do i get more verbose error logging or how should i trouble shoot this issue? First few lines from stacktrace…
KobbyPemson
  • 2,519
  • 1
  • 18
  • 33
1
vote
0 answers

How to trigger compile & reload in a cljs figwheel and cljsbuild project on webpack bundle update?

I have a mostly cljs project which I'd like to have figwheel compile and reload whenever I change the bundle.js file generated by webpack. I have webpack regenerating bundle.js whenever I edit the js, but how do I get figwheel to notice that its…
grumplet
  • 285
  • 2
  • 14
1
vote
1 answer

How to do a release/deploy build of a clojurescript app?

I'm ready to release my clojurescript app. Currently i do lein ring uberjar to create my jar, which does build cljs, but i dont see any documentation on how to do a release build-- do i need to do any concat-ing/minifying/bla bla bla? Are there…
Micah
  • 10,295
  • 13
  • 66
  • 95
1
vote
1 answer

How/Can I exclude inherited foreign libs from ClojureScript compiler output?

I am using reagent 0.5.0 which depends on cljsjs/react. The latter comes with the following deps.cljs {:foreign-libs [{ :file "cljsjs/development/react.inc.js", :file-min "cljsjs/production/react.min.inc.js", :provides ["cljsjs.react"]}], …
Andreas Steffan
  • 6,039
  • 2
  • 23
  • 25
1
vote
0 answers

How do I get cljx to compile clojure files into classes during uberjar?

I'm using cljx to build cli / cljs applications but haven't for the life of me been able to create a self packaged compiled jar. Here's my project file -> https://gist.github.com/chrispwood/4db33e53555a8e8787d1 When I run lein jar or lein uberjar I…
chris.wood
  • 253
  • 2
  • 10
1
vote
1 answer

Reagent Figwheel npes during build phase

I'm running lein figwheel + reagent, and while the the site seems to be updating, I can't track down what would cause the following stacktrace. Is there anyplace I should look? What does this error mean? lein figwheel Figwheel: focusing on build-id…
1
vote
1 answer

How do I set up cljsbuild to move non-compiled files into a specific folder?

My Clojurescript project is starts with three files -- an index.html, a css file, the hand-written .cljs code. When cljsbuild builds the .cljs file into a .js file, it puts it in an arbitrary location. I'd like to also move the index.html and css…
zck
  • 2,712
  • 2
  • 25
  • 44
1
vote
1 answer

ClojureScript + momentjs (node.js) fails with .format("dddd, MMMM Do YYYY, h:mm:ss a")

I'm trying to show current datetime format to console on node.js + clojure deploying momentjs . The working node js code: var moment = require("./lib/moment/moment.js"); console.log(moment().format("dddd, MMMM Do YYYY, h:mm:ss a")); Console…
user1028880
1
vote
1 answer

lein ring server does not automatically rebuild

I am writing a small clojurescript project and I followed the numerous lein cljsbuild examples that use lein ring as a development web server. I used to run lein ring server to serve the website on my local machine. Now it seems that lein ring…
wirrbel
  • 3,173
  • 3
  • 26
  • 49
1
vote
3 answers

How do I get the direct result of a simple clojurescript compilation?

I want to be able to inject javascript code into my app while testing. Following this line of reasoning, I do the following in a repl. => (cljs.closure/build '(swap! my-project.my-namespace.my-atom inc) {}) <= "goog.addDependency(\"base.js\",…
Stephen Cagle
  • 14,124
  • 16
  • 55
  • 86