This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-21
Channels
- # arachne (21)
- # beginners (22)
- # boot (58)
- # cider (27)
- # cljs-dev (67)
- # cljsjs (10)
- # cljsrn (13)
- # clojure (91)
- # clojure-greece (6)
- # clojure-russia (1)
- # clojure-uk (6)
- # clojurescript (6)
- # core-async (3)
- # cursive (6)
- # datomic (3)
- # events (2)
- # hoplon (152)
- # off-topic (44)
- # om (8)
- # om-next (7)
- # onyx (16)
- # protorepl (10)
- # re-frame (10)
- # reagent (22)
- # untangled (5)
does it respect index.js
as the entry point for a lib?
(or is that something GClosure already does?)
if everything works as planned then you should be able to just specify a single :foreign-lib
entry for .node_modules
@anmonteiro we shouldn’t need to do anything
Closure should be able to read entry point from package.json
ah right
@juhoteperi I don’t think reading from package.json is necessary
It is needed if one wants to refer just library and get the main entry point
the only issue I ran into here is that I couldn’t get advanced compilation to work with Maria’s circle-demo, but it seems it doesn’t have anything to do with what I’ve done?
else there is no mapping from react -> lib/react.js or something
but hmm.. I guess this is not needed when requiring JS modules from Cljs
But Closure does this internally for dependencies between CommonJS modules
@dnolen what do you mean advanced compilation to work?
it should compile just fine, just the demo doesn't work as expected
^ if this is what's happening, it's expected
:foreign-libs
:file
just needs to be on classpath - then you can require anything from that like a normal CLJS dep
👍 seems like we get the best of both worlds
i.e. no more weirdness about "do foreign libs need to be in the classpath?"
@anmonteiro right everything just follows the same conventions
this is awesome, can't wait to try it out
@anmonteiro right advanced compilation completes - but doesn’t work
last time I looked at it was an externs problem
@dnolen https://github.com/anmonteiro/om/commit/2a54bd9e02ea4332530b68bb8cd2107a1ce85c53
@juhoteperi btw would also probably be cool to have some version of this in CLJSJS
it is missing at least externs for svg properties, like cx, cy and maybe fill
if you really want advanced to work, try adding those externs
I also fixed a really annoying thing about cljs.spec today - https://github.com/clojure/clojurescript/commit/ec220f51efb8a456479c4d0b5c27e611d3abb551
probably the only other thing I’m going to look at before cutting a release is return type propagation for externs inference
so if you really want some ticket to make into the next release let me know - shooting for next Friday
I would vote for http://dev.clojure.org/jira/browse/CLJS-1075, not sure how hard it would be, it is already implemented in bootstrapped: http://dev.clojure.org/jira/browse/CLJS-1354 reason: just started working on support for nodejs development in Dirac DevTools[1], sourcemaps filesystem “links" are understood by nodejs, but DevTools cannot access them directly on filesystem, inlined smaps would solve it [1] https://github.com/binaryage/dirac/issues/31
but it does not have big priority, current workaround is to spawn a web server to serve source-maps, it is just tricky to setup paths/urls to properly match for average joe
@darwin that would also fix the timestamp hacks - I’m not going to have time to work on that myself
I barely recall that closure compiler has also some new options to produce combined source maps and optionally inline them
that could cover :advanced and :simple cases, I don’t think closure compiler is involved in :none, right?
I’d vote for these two:
http://dev.clojure.org/jira/browse/CLJS-1873 (making self-host tests great again)
http://dev.clojure.org/jira/browse/CLJS-1874 (a quirk discovered with self-host, :fn-var
analysis, and macros)
@bhauman let me know when you get a chance to get Figwheel working with this stuff - I’ve got a blog post brewing 🙂
looks like :source-map-asset-path
compiler option works, except for core.cljs, where is ignored for some reason, investigating...