On Monday, May 15, 2017 at 8:30:26 AM UTC+2, Shaun LeBron wrote:
> > The example still uses leiningen by I may drop that and create something 
> > standalone.
> 
> I'd like to show you around my "cljs/tool" some time for your standalone 
> thing. I'm a year into building it to wrap a good UX around cljs on npm 
> things as they become available, and I think this experimental feature could 
> be delivered pretty easily through it.

Hey Shaun,

I've been following your work on github.com/cljs pretty much since the 
beginning. It would safe me a ton of work if you want to cover the npm package 
side of things.

My plan so far was:

- create an uberjar for shadow-devtools (which would contain clojure, 
clojurescript, core.async and could add more)
- create a npm package with a shadow-cljs bin that uses java or node-jre
- shadow-cljs cli opts --watch --repl etc
- zero conf CLJS compilation mode that compiles to the shadow-npm module to 
quickstart things

When the user is ready to go into full-blown CLJS first mode it should be as 
simple as creating a build config and then running the full featured mode which 
includes Google Closure.

The hard part for that transition would be that the 
require("shadow-npm/cljs.core") would no longer work since it is pretty much 
impossible to make that work with :advanced.

The results of "webpack -p" on the shadow-npm thing are ok but nowhere close to 
what Closure would give you. I guess it is good enough if you are JS first with 
a bit of CLJS sprinkled on top.

I have no attachments to the shadow-cljs or shadow-npm names, I just used them 
because there already are so many cljs+npm, clojurescript+npm variations out 
there that I just didn't want to conflict with.

If you want to use this for your cljs/tool I'd be happy to make any changes 
you'd need. Although your current mix of lumo and figwheel really doesn't 
translate too well to the "create a pseudo node module" (ie. 
"./node_modules/shadow-npm/cljs.core.js" to enable 
require("shadow-npm/cljs.core"). Also the configs for shadow-devtools are 
substantially different from lumo/figwheel/cljsbuild, hopefully simpler though.

Currently it is all driven by this little CLI ns:
https://github.com/thheller/shadow-devtools/blob/master/src/main/shadow/npm/cli.clj

I just use it through leiningen since I didn't want to work through the 
dependency management, but you already have that covered. lein is not needed at 
all beyond that.

Since I'm not a JS dev and have been purely CLJS for 3+ years I really don't 
feel qualified to make decisions on what would be ideal for a JS dev. Current 
solutions all felt unnecessary complex though.

Happy to consider all feedback.

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to