Re: [ClojureScript] ClojureScript Compilation via Command Line

2016-08-15 Thread Mike Fikes
In the interim, you can pass multiple -e expressions, one for each form that 
would be in the build file you'd hypothetically be evaluating.

For example:

java -cp cljs.jar:src clojure.main -e "(require 'cljs.build.api)" -e 
'(cljs.build.api/build "src" {:output-to "out/main.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] ClojureScript Compilation via Command Line

2016-08-15 Thread David Nolen
It's not possible but only because nobody has contributed the necessary
patches. I'd be happy to see a comprehensive CLI story.

David

On Mon, Aug 15, 2016 at 8:00 PM, Brandeis King 
wrote:

> Hi,
>
> I understand ClojureScript can be compiled from the command line with:
>
> java -cp cljs.jar:src clojure.main build.clj
>
> Provided the system has the standalone ClojureScript jar and a "build"
> file with the following content:
>
> (require 'cljs.build.api)
>
> (cljs.build.api/build "src" {:output-to "out/main.js"})
>
> However, is it possible to compile ClojureScript via the command line
> without a "build" file and with traditional command line arguments, e.g.
> --output-to "out/main.js"?
>
> Thanks.
>
> -Brandeis
>
>
>
> --
> 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.


Re: [ClojureScript] Issue with cljs.pprint and tagged literals/elements

2016-08-15 Thread David Nolen
Open an issue in JIRA.

Thanks!
David

On Mon, Aug 15, 2016 at 6:37 AM, Miroslav Kubíček <
miroslav.kubi...@gmail.com> wrote:

> Hi there!
> I am having troubles making the cljs pretty print (cljs.pprint/pprint)
> behave the same way as the regular cljs or clj print function when it goes
> down to tagged elements that are by default used to denote custom records.
>
> See example below - pr, pr-str, print and print-str functions all use the
> default approach toward creating (edn-like) tagged element for MyRecord adn
> all produce the same result:
> #cljs.user.MyRecord{:value "a"}
>
> On the other hand pprint just ignores the record's tag and simply just
> traverses/prints it as a map:
> {:value "a"}
>
> Is there some setting and/or parameter in cljs.pprint namespace I am
> missing? I looked briefly at the code, but it seems it uses print-str by
> default - so maybe it just traverses the graph depth-first and does not
> check for every node's type?
>
> THIS WORKS:
> cljs.user=> (defrecord MyRecord [value])
> cljs.user/MyRecord
> cljs.user=> (pr (MyRecord. "a"))
> #cljs.user.MyRecord{:value "a"}
> nil
> cljs.user=> (pr-str (MyRecord. "a"))
> "#cljs.user.MyRecord{:value \"a\"}"
> cljs.user=> (print (MyRecord. "a"))
> #cljs.user.MyRecord{:value a}
> nil
> cljs.user=> (print-str (MyRecord. "a"))
> "#cljs.user.MyRecord{:value a}"
>
> BUT THIS DOESN'T:
> cljs.user=> (cljs.pprint/pprint (MyRecord. "a"))
> {:value "a"}
> ("{:value \"a\"}\n")
> cljs.user=> (with-out-str (cljs.pprint/pprint (MyRecord. "a")))
> "{:value \"a\"}\n"
>
> Thanks for help!
>
> Cheers
> Miro
>
> --
> 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] Issue with cljs.pprint and tagged literals/elements

2016-08-15 Thread Miroslav Kubíček
Hi there!
I am having troubles making the cljs pretty print (cljs.pprint/pprint) behave 
the same way as the regular cljs or clj print function when it goes down to 
tagged elements that are by default used to denote custom records.

See example below - pr, pr-str, print and print-str functions all use the 
default approach toward creating (edn-like) tagged element for MyRecord adn all 
produce the same result:
#cljs.user.MyRecord{:value "a"}

On the other hand pprint just ignores the record's tag and simply just 
traverses/prints it as a map:
{:value "a"}

Is there some setting and/or parameter in cljs.pprint namespace I am missing? I 
looked briefly at the code, but it seems it uses print-str by default - so 
maybe it just traverses the graph depth-first and does not check for every 
node's type?

THIS WORKS:
cljs.user=> (defrecord MyRecord [value])
cljs.user/MyRecord
cljs.user=> (pr (MyRecord. "a"))
#cljs.user.MyRecord{:value "a"}
nil
cljs.user=> (pr-str (MyRecord. "a"))
"#cljs.user.MyRecord{:value \"a\"}"
cljs.user=> (print (MyRecord. "a"))
#cljs.user.MyRecord{:value a}
nil
cljs.user=> (print-str (MyRecord. "a"))
"#cljs.user.MyRecord{:value a}"

BUT THIS DOESN'T:
cljs.user=> (cljs.pprint/pprint (MyRecord. "a"))
{:value "a"}
("{:value \"a\"}\n")
cljs.user=> (with-out-str (cljs.pprint/pprint (MyRecord. "a")))
"{:value \"a\"}\n"

Thanks for help!

Cheers
Miro

-- 
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] [ANN] clojurescript.org

2016-08-15 Thread Alex Miller
We are pleased to announce that http://clojurescript.org is now a site rather 
than a redirect to the github repo. Content was seeded from the CLJS wiki.

The site contribution process is the same as http://clojure.org - Contributor 
Agreement is required, but then contributions can be sent via PR. More info 
here:

http://blog.cognitect.com/blog/2016/8/15/welcome-clojurescript-org

-- 
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] ANN: ClojureScript 1.9.211, cljs.spec fixes

2016-08-15 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code.

README and source code: https://github.com/clojure/clojurescript

Leiningen dependency information:

[org.clojure/clojurescript "1.9.211"]

This release addresses a few bugs around cljs.spec discovered in the
last release along with relevant fixes for self-hosted ClojureScript.

As always feedback welcome!

## 1.9.211

### Fixes
* CLJS-1746: Log the result of loading a dependency
* CLJS-1657: Self-host: Implicit macro loading with alias
* CLJS-1742: Add docstring for new refer-clojure REPL special
* CLJS-1274: Allow assignment to namespace-qualified names in current
namespace
* CLJS-1744: rest produces nil for larger maps
* CLJS-1740: Self-host: Need to port more of CLJS-1733
* CLJS-1741: Add :rename to :refer-clojure in ns docstring
* CLJS-1737: Self-host: clojure alias implicit macro use regression
* invalid cljs.spec/merge res call
* CLJS-1739: seq on map literal with 9 elements leads to rest producing nil
* CLJS-1738: Self-host: need to update call to
check-use-macros-inferring-missing

-- 
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.