Fork me on GitHub

yes! that will help a lot. thanks so much!

✌️ 4

@jpaulorio I tend to agree with @milomord. If you start with react, try re-com for its really useful layout components, then re-frame for it's nice handling of state. I would say don't let the initial complexity of re-frame put you off. Once you get through the intro pages it's not so hard, and I really like the way it encourages me to write clean code. Note: re-com does come with a warning about not working with older browsers as it relies on flexbox. Personally I don't see this as a problem but it might be, depending on what you are trying to create.


Also, @dehli. You can use doo directly as a library instead of using lein-doo (which is what cljs-test-runner does under the hood)


At the moment cljs-test-runner only allows you to use either node or phantomjs to run your tests


oh very cool. i’ll give that a look as well.


so if you want chrome-headless or something similar it’s best to use doo directly


(it’s what we’ve been doing)


gotcha. are you using core async?


I’ve seen that there is a fork for node, and was wondering if you had to use that


with lumo, the regular core.async library doesn’t work but it’s sounding like it’s working for you all


our code targets the browser, and for that the regular core.async works just fine


we don’t use lumo or planck


just the standard compiler


Gotcha. Well if this works well for us, we’ll just be going that route too 🙂 Thanks again for your help! Lots of really good resources there


glad to help ✌️


I am debugging a problem with dependencies and I want to be sure of a newbie question, with :simple, are all the node_modules dependencies bundled in the produced file? Meaning, am I required to deploy only that file with no node_modules?


ok no, I am always going to need node_modules


Currently on the verge of despair trying to use :npm-deps, has anyone seen this error or know how to get the compiler to print more info on what it's doing behind the scenes? Setting the :verbose true compiler option didn't help... 😞

throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'path', 'string');

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
    at assertPath (path.js:39:11)
    at Object.resolve (path.js:1091:7)
    at Deps.<anonymous> ([eval]:199:40)
    at Deps.emit (events.js:185:15)
    at endReadableNT (node_modules/readable-stream/lib/_stream_readable.js:1010:12)
    at process._tickCallback (internal/process/next_tick.js:114:19)
I don't even know where to begin with this little info to work on....


@akiroz how many :npm-deps do you have? Can you isolate the one that breaks?


Right, let me give that a try~ Reminds me of the old days of debugging bare-metal code bind by commenting stuff out lol


@akiroz this probably isn’t what you want to hear, but i gave up ages ago trying to get that feature to work, because I was having just the kind of problems you are having. I’d really think about other techniques to include npm libraries. The feature is pretty fragile.


@lee.justin.m yeah, I'd probably have given up too if this was a serious project... but I want to get this working for my personal learning projects


oh okay that’s different. i just didn’t want you to get stuck if you just wanted to get it workin


@richiardiandrea Found the culprit to be grommet on my end but this guy has a massive dependency tree. Time to break out the ol' bisection method 😶


@akiroz that's good to know what breaks, tomorrow I will try it out as well


@akiroz some time ago I saved this, might be useful:


Prints out the data structure used to feed npm deps to the GCC, maybe you can paste it here at some point with grommet and folks can double check if that's ok

👍 4

@richiardiandrea the modules in npm-deps.edn shows every entry with :module-type :es6, is that normal?


@akiroz yes that is normal as of last Cljs version. The type will be filled after GCC finishes processing


@richiardiandrea I've created a minimal project with grommet as an npm-dep here:


I get a clojure.spec.alpha$regex_spec_impl$reify__2436 when I make a ns mistake. Is this a clojure.spec, cljs or boot-cljs issue? :thinking_face:


Sounds like it’s boot related


As boot seralizes exceptions to send from pod to the main container AIUI


@akiroz I am having a go with cljs.main and your project compiles fine


actually no, there is an error in

      throw er; // Unhandled 'error' event

Error: module not found: "./locale-data/complete.js" from file /home/arichiardi/git/npm-deps-test/node_modules/intl/index.js


will send a PR over


Looks like I'm going to be putting together a multi-module project (which may get open sourced in the future). Are there any good, recent examples of multi-module projects out there to explore?


By "multi module" do you mean a mono-repo? I would be very interested int the progress made here as I am working on seeing how a mono-repo would work using clj


Specifically, I'm talking about code splitting with goog closure's module-based code-split mechanism


But I'm using the clj/cljs.main stack in a monorepo like way. It definitely kicks ass.


juxt has a project called edge that has some good architecture for clj usage too


I have been digging through edge. The next thing they need is an example of another repo to flesh out how multiple projects would look


Nice work on the demo repo though!


yeah, once the bugs are ironed out, it should be pretty useful. I'm going to be setting up a fairly sizable project. Trying to model it off of google's new MDC project, which uses goog-closure module code splitting functionality.


Do you have a link to this project?


it's basically MDL part 2


Nice. Are you using the project as a proof of concept or to actually use in your own projects?


Proof of concept. I work at Yetanalytics and we build re-mdl which is a reframe thing for mdl. That fact that MDC is closure-fied is sweet and we'll probably come out with a re-mdc as well, which wraps MDC. This project is more related to analytics, but I want to make it equally modular as MDC


@richiardiandrea Thanks for the help! 🙂


I want to use a number of react libs in my app. each of them has a different version of react that they depend on. how are people dealing with this?


I’ve tried using cljsjs but then I have to find the best guess at an explicit react dep that works for all


I’m wondering if npm-deps might help because npm apparently download each lib using it’s own specific react dep but I’m not sure how Google Closure will handle this