This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (241)
- # boot (18)
- # bristol-clojurians (4)
- # cider (1)
- # clara (77)
- # cljs-dev (79)
- # cljsjs (27)
- # clojure (181)
- # clojure-austin (9)
- # clojure-dev (30)
- # clojure-gamedev (11)
- # clojure-italy (5)
- # clojure-losangeles (3)
- # clojure-poland (1)
- # clojure-spec (42)
- # clojure-uk (34)
- # clojurescript (181)
- # core-async (5)
- # core-logic (2)
- # cursive (16)
- # datascript (12)
- # datomic (33)
- # emacs (8)
- # figwheel (1)
- # fulcro (27)
- # jobs (2)
- # jobs-discuss (21)
- # lein-figwheel (1)
- # lumo (18)
- # off-topic (17)
- # onyx (5)
- # pedestal (5)
- # re-frame (27)
- # reagent (49)
- # remote-jobs (1)
- # ring (2)
- # ring-swagger (1)
- # shadow-cljs (40)
- # spacemacs (5)
- # sql (29)
- # unrepl (13)
I made browser REPL a bit smarter, it only compiles the preload stuff now, and it always requires it when starting up - that means you should be able to use browser REPL on a project where you weren’t initially using it
soooo :tada: @dnolen this compiles fine now!
clojure -A:cljs-canary -m cljs.main -cf "$(cat cljsc_opts.edn)" -c ep-cloud.handlers
@dnolen apologies if this is off of the main thrust of development, but this ticket and patch seems like pretty clear win https://dev.clojure.org/jira/browse/CLJS-2581
are JS dependencies working in a
node REPL? just checking now, I thought they did
If you use
cljs.main to compile a browser-based project specifying
-O advanced you can still add
-r to cause the browser to launch and run your project, which is actually useful IMHO. But, of course, an interactive REPL connection won’t be established.
It is tempting to think of
-r in this usage as short for “run” and of these two lines displayed
it tempting to simply omit the second if
Serving HTTP on localhost port 9000 Listening for browser REPL connect ...
-Ois anything but
Yep I think I found a problem and I opened a Jira, I also wonder whether having the compiler options should behave as a
-c, having all the options in there that you need...or maybe allow an empty
-co is there
Just so that I understand better, no empty
-c for now but yes
The whitespace and negative space in the default
index.html were really bothering me so I've added a patch to https://dev.clojure.org/jira/browse/CLJS-2584 that tweaks things in a way that look much better to me personally. Here is what the patch would do. Left is before, right is after.
The result is somewhat responsive, placing a max width on the paragraphs, and centering, etc.
@bhauman Thanks. I think it is important—it is perhaps one of the first impressions new users might have of ClojureScript.
@bhauman Yeah. My only feeling at this point is perhaps more succinctness, while still trying to clearly convey what is important.
I didn’t. Feel free to try that variation. It might look better. If done, I wonder if the logo might need to be a tad bit smaller to then give the textual content more “weight”.
cljs.user=> ((or int? string?) 1) #object[cljs$core$int_QMARK_]
(cljs.core.int_QMARK_) || (cljs.core.string_QMARK_).call(null,(1))
@bhauman I think you are right. And making the logo smaller seems to be the right thing to do.
Cool, put a 3rd patch in https://dev.clojure.org/jira/browse/CLJS-2584 that does that.
OK now that I see this, the body should probably have a white background with black text :wink: and endless tweaks from there
Feel free to take my patch in https://dev.clojure.org/jira/browse/CLJS-2584 and produce a revision. My HTML skills are not that strong.
yes, and then of course we could have a like to some appropriate docs for first time REPL users.
trying to release figwheel and rebel this morning for the last day of the first month of clojurists together
Cool. I assigned https://dev.clojure.org/jira/browse/CLJS-2584 your way so David doesn’t accidentally apply it prior to tweaks.
@richiardiandrea https://dev.clojure.org/jira/browse/CLJS-2582 do not include random commands, only stuff that can be repeated w/o whatever setup you have, thanks :slightly_smiling_face:
from my local experiments the map is merged correctly, it seems something else is off in
cljs.repl.node with the form
(do (.require js/goog "cljs.core") (enable-console-print!)). Haven't gotten deeper yet.
Yeah, I was testing something and was distracted by its beauty and forgot what I was doing.
There's a bit of repetitive verbiage that we can probably eliminate surrounding "your own HTML file" and "providing your own
index.html". Perhaps we can somehow improve the copy without a bunch of patches (via gist, or somesuch?)
No rush... I think getting the copy right takes walking away from it to actually see the awkward bits.
Not bad, I think you wrote the initial copy in a 5-minute blast of typing. :slightly_smiling_face:
@mfikes I think the
cljs.main stuff probably deserves a tour blog post which shows all the neat things you can do - if you’re interested in writing one that would be cool
For the index page, how about something like this? It answers a question I had when reading the current copy:
Welcome to the ClojureScript Browser REPL. This page provides the evaluation environment for the Browser REPL and your application. You can validate the connection by typing (js/alert "Hello CLJS!") into the ClojureScript REPL that launched this page. When everything works correctly, you will see a popup in this window. Use your own start page by creating an index.html file in the directory that you launched this REPL from. After you create or save changes to this file, Reload Page in the browser to see the new version. Begin with this template to get a blank page: [should the template have a <h1>index.html</h1> instead of being blank?] For more examples, see our <a>ClojureScript Browser REPL tour</a>.
Thanks for the feedback! It sounds like @bhauman and I have an interest in revising the copy, and we'll take a look at your input as well.
Interesting thought: If there were some way to avoid the absolute need for a disk-based
"out" (effectively compiling to memory, a lot like self-hosted), some of the
cljs.main use cases (like "run this script", or "evaluate this form") could benefit a little by not needing the file system. I think we are far away from being able to support something like that, but it is an interesting thought nonetheless.