This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-22
Channels
- # admin-announcements (1)
- # aws-lambda (1)
- # beginners (38)
- # boot (48)
- # cider (11)
- # clara (4)
- # cljs-dev (61)
- # cljsrn (9)
- # clojure (68)
- # clojure-austin (3)
- # clojure-greece (9)
- # clojure-mexico (6)
- # clojure-russia (40)
- # clojure-spec (165)
- # clojure-uk (134)
- # clojurescript (37)
- # cursive (5)
- # datomic (25)
- # defnpodcast (2)
- # hoplon (1)
- # jobs (1)
- # juxt (1)
- # lein-figwheel (3)
- # leiningen (4)
- # mount (14)
- # off-topic (8)
- # om (29)
- # onyx (9)
- # protorepl (4)
- # quil (1)
- # re-frame (56)
- # reagent (3)
- # rethinkdb (1)
- # spacemacs (4)
- # specter (12)
- # test-check (2)
- # testing (1)
- # vim (12)
- # yada (4)
@krchia you may be misunderstanding how Closure modules it supposed to work. It only really makes 1 build and then effectively splits them into modules. What instructions are you following?
@dnolen my understanding is probably really weak here. im using the official clojurescript wiki page on compiler-options as a reference, and i’m assuming that it should build multiple js files if it’s successful?
is it possible to have a namespace contain both a macro for cljs
and clj
e.g. I want defthing
to be applicable but different depending on cljs
vs clj
?
@hueyp: definitely. I tend to use something like this: https://github.com/ladderlife/om-css/blob/master/src/main/om_css/utils.cljc#L9
:thumbsup: @anmonteiro
@anmonteiro: any examples in your projects I could peek at? 🙂
@hueyp: yeah, e.g. https://github.com/ladderlife/om-css/blob/master/src/main/om_css/core.cljc#L249
that’s like the simplest case possible
@bhauman: I have a PR to send tonight. Your example gave me enough to build upon and test with.
@krchia I believe there’s an example on how to build modules besides the short compiler option description
and yes you should get multiple files - assuming of course you’ve actually supplied the options correctly
I just realised how recently you merged. I didn't look at the timestamp. My apologies for being a pest
greetings! is there any difference from the point of view between importing classes defined-and-exported as
export default class MyClass extends Component
//vs.:
export class MyClass extends Component
export default MyClass;
is it (def MyClass (js/require "../components/MyClass"))
in both cases?
(in js it is:)
import MyClass from '../components/MyClass';
//vs.:
import { MyClass } from '../components/MyClass';
@bhauman: @dominicm: Got the repl working with latest commit!
it turns out you need to add (.-default)
:
(def MyClass (.-default (js/require "../components/MyClass")))
if a class is defined this way:
export default class MyClass extends Component
@darwin: Going to finally try out either cljs-devtools or dirac - any recommendation on which to go with or info on the differences between the 2?
@shaun-mahood: start with cljs-devtools, when you get familiar with it, you can think about using dirac
dirac assumes use of cljs-devtools, those two tools are not mutually exclusive, dirac goes beyond what can be implemented in cljs-devtools
@darwin: Ok, thanks
I have a webpage that needs to remain conventional, for speed, but I’d like to put a small inline CLJS script on it to do email collection, so I’d like the compiled JS to be tiny.
@arohner: Any cljs on the page/cache already?
No ideas from me then, I've not seen anything specific outside of utilizing google closure modules and dead code elimination. Hope you find something good and put in in version 2 of your book (I've skimmed it but haven't had the time to go through it in detail yet, looking like I'll learn a lot of good stuff though).
@arohner: only use goog
and avoid using persistent collections 😛
@martinklepsch: yeah, that’s kind of my thinking. Writing JS-in-CLJS and minimal goog
is what I’m after
but it’d also be nice to have a macro/lib thing to handle the inline build, so I can just stick that in my server-side hiccup
ah. I prefer leaving the building to build tools 🙂
Gotta sleep, much success @arohner