Sure! As soon as my changes get merged in and released, I’ll get something up and reply here with the details. -- Jeremy Shoemaker
From: i - blis <[email protected]> Reply: [email protected] <[email protected]>> Date: May 4, 2015 at 6:48:34 AM To: [email protected] <[email protected]>> Subject: [ClojureScript] Re: ClojureScript, NodeJS, and CLIs This is something I have been considering for a while. I ended up being not able to package the script and having to run it through a wrapper and symbolic link. Then, I abandoned the idea altogether. Once you pushed the required changes, would you published your efforts and the said lein template somewhere? I (and probably others) would be pretty interested in smoothing a cljs nodejs scripting workflow. Nice initiative. On Thursday, 30 April 2015 17:25:47 UTC+2, Jeremy Shoemaker wrote: > Hi, > > I started playing around with ClojureScript on NodeJS recently, and I was > looking at making a lein template for making CLI tools that would work with > npm so that the "binaries" end up in your path and can be used like any other > NodeJS CLI tool. > > I ran into trouble quickly because it seems when you compile using :target > :nodejs, at runtime, it's expected that you set *main-cli-fn* to something. > > In this case, I don't need that because I'm writing a wrapper JS file that > runs the tool and is specified in the "bin" section of the package.json file > that npm looks for. > > It looks like it's trying to execute the main function as soon as I require > the compiled JS file. > > My question is, why is this behaviour forced as it is? It breaks what I'm > trying to do, but worse it seems to preclude the possibility of writing a > library that can be required into other NodeJS projects, even Javascript > projects. It just seems to me that forcing this makes it harder to use > ClojureScript with the rest of the Javascript NodeJS ecosystem. I don't see > how I could write a ClojureScript NodeJS library that can be used by someone > using Javascript on NodeJS. > > Is there some way I can work around this limitation? If you need example > code, I can provide some. > > Thanks, > Jeremy -- 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/WH6zeE8yraA/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 http://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 http://groups.google.com/group/clojurescript.
