I don't like the way of writing `x.assoc(null, 'foo', 'bar')` by myself.
Also I don't people would accept that.
I see the problem now. ClojureScript compilers may have tricky behaviors
that make it different from CoffeeScript's compiling processes.
Putting `x.cljs` files in npm is fine, it's just slower. To me compiling
ClojureScript is always slower, I already accepted that.
I think here are may main concerns:
* in js projects, we regard code in `node_modules` are modules instead of
source code. For web projects using Webpack, I would prefer using a
'compiled/' folder to hold the code and then config `resolve.alias` to make
sure I import the code with `require('cljs/foo.bar.core')`.
https://webpack.js.org/configuration/resolve/
* For nodejs projects, somehow I can accept the solution that we use
`require('../../compiled/foo.bar.core')`. But I guess it may bring
problems, which makes your `shadow-cljs` solution a better choice...
* does shadow-devtools compiled cljs files incrementally? If it does,
Webpack may use it to hot replace module.
On Wed, May 17, 2017 at 2:56 AM Thomas Heller <[email protected]> wrote:
> On Tuesday, May 16, 2017 at 8:27:44 PM UTC+2, Thomas Heller wrote:
> > If I understand correctly the short answer is: no.
> >
>
> I should add: You can use shadow-cljs in your coffeescript project if you
> just want to use cljs.core or some other CLJS package. You do not need to
> write CLJS yourself to make use of shadow-cljs.
>
> var x = require("shadow-cljs/cljs.core");
> x.assoc(null, "foo", "bar");
>
> is basically the same as
>
> var x = require("mori")
> x.assoc(null, "foo", "bar");
>
> But you would need to run shadow-cljs in your project.
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ClojureScript" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojurescript/AGXku7Ous0Y/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/clojurescript.
>
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.