Fork me on GitHub

Does anybody run the clojurescript compiler from a tools.deps build.clj file? I'd like to be able to play with my cljs build in the repl, but all the docs talk about running the compiler from the command line. I'm sure I'd be able to figure it out by digging through the source code, but I thought I'd check if anybody knows of a writeup anywhere.


Here's how I use it


(ns build (:require [ :as b] [shadow.cljs.devtools.api :as shadow])) (defn uber [_] (clean nil) (shadow/release :app) ...)


I'm not using shadow-cljs yet, but this is a useful pattern to follow. And I'm sure that the release function does exactly what I want to do, so that will be a good reference. Thanks!


Is there a version of map that builds a JS array instead of a CLJS data structure?


This works:

(-> (into-array [1 2 3]) (.map inc))
#js [2 3 4]
but there might be a more performant way without creating an array first. Could make it myself of course


FWIW, I'm 90% certain there's no such function.


Oh, but there's a function in JS that works on CLJS collections:

=> (js/Array.from [1 2 3] inc)
#js [2 3 4]

👍 1


😄 2
Asko Nōmm11:01:16

If you’re using Storybook with CLJS, how have you fixed the issue of JS heap running out memory when trying to compile things like specter, when compiling with webpack?

Asko Nōmm11:01:48

Since all of CLJS core files are also being ran through it, webpack dies.


I don't use Storybook but FWIW I have stopped using Specter on frontend after noticing by how much it increases the bundle size.

👍 1

I believe it's babel that needs to not try to process the files, you can try using ignore in the .storybook/main.js config. I haven't tried in a while, but something like this:

babel: async (options) => {
      console.log("babel options: ", options)
      return {
        ignore: [


I posted this a few weeks back, but since we're still looking for more responses, I'll post it here one more time for those who missed it: The Programing Research Laboratory at Northeastern University is conducting a study on the usability of visual and interactive syntax for ClojureScript. Participation involves filling out a questionnaire and is expected to take about 30 minutes. The questionnaire consists of multiple choice and free form responses. All questions are optional and responses are anonymous. If you are interested in participating, please visit: (Chrome Recommended) To learn more about visual and interactive syntax for ClojureScript, please visit: If you have any questions, please contact: <mailto:[email protected]|[email protected]>