This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-06
Channels
- # beginners (95)
- # boot (3)
- # cider (13)
- # cljs-dev (9)
- # cljsjs (1)
- # cljsrn (35)
- # clojure (78)
- # clojure-dev (5)
- # clojure-italy (6)
- # clojure-nl (9)
- # clojure-russia (13)
- # clojure-spec (1)
- # clojure-uk (74)
- # clojurescript (59)
- # community-development (6)
- # core-async (41)
- # css (110)
- # data-science (2)
- # datomic (22)
- # defnpodcast (1)
- # devcards (1)
- # docs (1)
- # editors (6)
- # emacs (51)
- # figwheel (1)
- # fulcro (66)
- # jobs (1)
- # jobs-discuss (75)
- # lumo (51)
- # mount (2)
- # off-topic (33)
- # pedestal (24)
- # proton (3)
- # re-frame (29)
- # reagent (92)
- # reitit (16)
- # shadow-cljs (16)
- # spacemacs (4)
- # specter (6)
- # vim (6)
- # yada (7)
Like this you mean? https://github.com/Olical/cljs-test-runner
@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)
https://github.com/bensu/doo#library
At the moment cljs-test-runner
only allows you to use either node or phantomjs to run your tests
so if you want chrome-headless or something similar it’s best to use doo
directly
(it’s what we’ve been doing)
yep, why?
fork for node?
core.async (https://github.com/mfikes/andare)
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
@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: https://github.com/akiroz/npm-deps-test
I get a java.io.NotSerializableException: 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
events.js:183
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
This is the beginnings: https://github.com/johnmn3/cljs-main-code-splitting/tree/master
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?
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?