Clojurians
#cljs-dev
<
2018-03-31
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

juhoteperi18:03:55

@jannis foreign-libs preprocess option works like that. I don't remember if it can be used with node modules. The implementation should work but not sure how to use the option.

dnolen18:03:15

hrm I suppose we could support notion of preprocess at inputs level pre-compile

dnolen18:03:37

then you could file match

jannis19:03:26

That would make things pretty flexible and I bet allow various small problems to be fixed on the fly.

jannis19:03:59

What could that look like?

(b/build
  {:preprocess-js [{:file "node_modules/lib/symbol-observable/lib/index.js"
                    :fn (fn [ijs] ...)        ; returns an IJavaScript again
                    :method :fix-babel-output ; alternative (similar to :preprocess of :foreign-libs): a dispatch key
                    }]})

dnolen20:03:53

no just an arbitrary function which takes inputs before we call Closure

dnolen20:03:32

in order to do make this possible we need to make our pipeline more Closure like, i.e. put compiled source on the input not on disk

jannis22:03:22

What does "on the input" mean in this case?

jannis22:03:37

I think I understand: the compiled source would have to be available, in memory, as part of or along with the input, to the processing function, so it can efficiently read/update it instead of having to go to the disk.

jannis22:03:50

When you say "input", are you referring to the IJavaScript objects (I am)?

dnolen22:03:26

IJavaScript is not long for this world

dnolen22:03:29

the input maps