Re:Using JavaScript Modules in ClojureScript
by babbeloski on Friday January 27, 2017 @11:43PM
(#13504947)
Clojurescript is the most complete to JS languange. The build and developer tools are _ahead_ of Javascript. The language is great too, and it's pretty 1:1 with javascript, plus all the other goodies. It's not going to satisfy haskellers, but when you look at the big picture it wins over Elm (at the moment, I love Elm too)
Re:Using JavaScript Modules in ClojureScript
by tomerweller on Saturday January 28, 2017 @02:19PM
(#13508246)
The fact that their example includes using cljsjs package for externs is troubling. For the meanwhile, to avoid worrying about extern files, I'd stick to using a separate build process for npm packages.
Re:Using JavaScript Modules in ClojureScript
by apviitanen on Saturday January 28, 2017 @05:41PM
(#13509952)
Yeah, but without externs this breaks on advanced compilation, right? So, while using webpack to bundle npm deps is a good idea (that might also get unnecessary in the future with things like node module resolution landing in cljs compiler), you still need externs for the functions you're going to call from your cljs code. Luckily the latest cljs compiler will help you get those right.
I'm met with an error when running `node main.js`.
> SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
Do you know why that's necessary and why it wasn't mentioned in the tutorial?
Granted, I was using an outdated version of Node, but perhaps it'd be helpful to add a >= version number to the Node dependency blurb (a la JDK 8).
Either way, thanks for your continued efforts!
Shameless self promotion: http://blob.tomerweller.com/reagent-import-react-components-...
Because then I can play with NPM packages on my phone while I commute. Let's do this!