[ClojureScript] Re: A new take on ClojureScript and npm
Too tired to make a proper announcement but I just pushed the first preview version of the shadow-cljs npm package. https://www.npmjs.com/package/shadow-cljs npm install -g shadow-cljs shadow-cljs --once node var x = require("shadow-cljs/cljs.core"); x.enable_console_print_BANG_(); // oops x.prn(x.assoc(null, "foo", "bar")); More tomorrow ... -- 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.
[ClojureScript] Re: A new take on ClojureScript and npm
> > I think it should be possible to use closure-compiler-js [1] with this > project to do DCE if needed. > In a way you can and you can't. The same way :npm-deps has issues. The Closure Compiler (JS or JVM version, doesn't matter) is not yet capable of compiling everything in the npm world. Some things just don't work. So instead of making something that "maybe" works I opted to drop the Closure Compiler entirely. The intent here is to enable JS devs to start using CLJS seamlessly without giving up their tools. They don't have the Closure compiler to begin with so they won't miss it. Enabling the Closure Compiler is my top priority though. I'm definitely keeping my eye on this and will provide a proper solution if it ever becomes solid. -- 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.
[ClojureScript] Re: A new take on ClojureScript and npm
On Monday, 15 May 2017 12:48:38 UTC+1, Thomas Heller wrote: > Also removed all traces of lein, the examples now just use an uberjar of > shadow-devtools. > > Certainly not the final solution I have in mind but getting closer. I think it should be possible to use closure-compiler-js [1] with this project to do DCE if needed. [1] https://github.com/google/closure-compiler-js -- 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.
Re: [ClojureScript] Re: ANN: ClojureScript 1.9.542, spec changes & REPL enhancement
That runtime error doesn't necessarily seem related to the compile time warning. Would need more information. On Mon, May 15, 2017 at 10:16 AM, Tatu Tarvainenwrote: > > My phantom test run crashes with: > TypeError: undefined is not an object (evaluating 'schema.core.MapEntry. > prototype') > > I'm assuming that is related to this change, but I'll need to investigate > more. There's already a merged PR for schema that excludes MapEntry in > refer-clojure. I'm hoping that will fix this. > > > maanantai 15. toukokuuta 2017 14.32.55 UTC+3 David Nolen kirjoitti: >> >> That's just a warning. Is there some deeper breakage that you are >> observing? >> >> David >> >> On Sun, May 14, 2017 at 3:09 AM, Tatu Tarvainen >> wrote: >> >>> >>> > * CLJS-2013 - Add MapEntry type >>> >>> This change seems to break plumatic schema, after upgrading I'm getting >>> warnings: >>> >>> WARNING: ->MapEntry already refers to: cljs.core/->MapEntry being >>> replaced by: schema.core/->MapEntry at ... schema/core.cljs >>> >>> Plumatic also defines a MapEntry record type which clashes with the core >>> one. >>> >>> -- >>> 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 clojurescrip...@googlegroups.com. >>> To post to this group, send email to clojur...@googlegroups.com. >>> Visit this group at https://groups.google.com/group/clojurescript. >>> >> >> -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to cloj...@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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.
[ClojureScript] Re: A new take on ClojureScript and npm
Also removed all traces of lein, the examples now just use an uberjar of shadow-devtools. Certainly not the final solution I have in mind but getting closer. -- 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.
[ClojureScript] Re: A new take on ClojureScript and npm
I just did a quick test for React Native. https://github.com/thheller/npm-module-example/tree/master/examples/react-native-example Since it is the first time I started react-native I really have no idea what is going. It works but is extremely slow to start. I don't know why, just wanted to see if it can work at all. If someone has suggestions on how to make it start faster let me know, also need to look into their HMR which doesn't seem to work. -- 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.
Re: [ClojureScript] Re: ANN: ClojureScript 1.9.542, spec changes & REPL enhancement
That's just a warning. Is there some deeper breakage that you are observing? David On Sun, May 14, 2017 at 3:09 AM, Tatu Tarvainenwrote: > > > * CLJS-2013 - Add MapEntry type > > This change seems to break plumatic schema, after upgrading I'm getting > warnings: > > WARNING: ->MapEntry already refers to: cljs.core/->MapEntry being replaced > by: schema.core/->MapEntry at ... schema/core.cljs > > Plumatic also defines a MapEntry record type which clashes with the core > one. > > -- > 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. > -- 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.
[ClojureScript] Re: A new take on ClojureScript and npm
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.
[ClojureScript] Re: A new take on ClojureScript and npm
> 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. -- 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.