This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-20
Channels
- # announcements (27)
- # aws (1)
- # beginners (62)
- # boot (5)
- # calva (56)
- # clj-kondo (6)
- # cljdoc (3)
- # cljsrn (4)
- # clojure (65)
- # clojure-dev (17)
- # clojure-europe (2)
- # clojure-italy (17)
- # clojure-nl (24)
- # clojure-spec (30)
- # clojure-uk (14)
- # clojurescript (35)
- # clr (7)
- # cursive (8)
- # data-science (3)
- # datascript (38)
- # datomic (15)
- # emacs (16)
- # fulcro (34)
- # hyperfiddle (1)
- # immutant (1)
- # luminus (7)
- # nrepl (1)
- # off-topic (38)
- # pedestal (2)
- # planck (10)
- # re-frame (7)
- # reagent (7)
- # reitit (9)
- # shadow-cljs (36)
- # sql (19)
- # tools-deps (11)
- # vim (64)
- # xtdb (18)
[meander/delta "0.0.76"]
is available. The pattern matching and substitution compilers emit much better code than previous versions with more optimizations. The performance improvements are dramatic on both fronts.We’ve got a tutorial in the works with an open pull request for folks looking to learn how to use Meander in practice. I must apologize for doing a poor job on explaining the utility and philosophy of the library in the README! My primary focus has solely been on building the library itself rather than “marketing” it. Pending a release of a good tutorial and improvements to README, I’m happy to respond to questions at the project homepage and in the #meander channel. 🙂 https://github.com/noprompt/meander
A novel addition to the latest branch of the project (`delta`) is the ability to express recursive patterns. Have a look! Give it a try! https://github.com/noprompt/meander#with
Published a beginner friendly blog post on deploying ClojureScript to Github Pages https://betweentwoparens.com/deoploy-clojurescript-to-github-pages
Thank you for taking the time to write and publish this. It may seem simple but I couldn't find a similar article back in the day. I've been using Netlify ever since (found it easier to begin at the time) but using GitHub pages seems to be just as simple.
I recently did a video of using ClojureScript, figwheel-main, reagent and Bulma CSS framework for deployment on GitHub pages https://www.youtube.com/watch?v=nn_5NVgCps4&list=PLy9I_IfUBzKJSgctCJaRYcnF6kZdiZ5ku&index=23 Nice to see the different approaches.
@tkjoine Would 'static' here accommodate a self hosted ClojureScript site? No server, database, server side requirements, but fully 'active'
Good question. TMK it should, but maybe I am missing something.
Maybe this is another example of Serverless computing 😁
@tkjone I gave it a try and got an error.
$ clj -m cljs.main -d "demo-clojurescript-gh-pages/out" -c demo.static-website -r
Exception in thread "main" java.io.FileNotFoundException: Could not locate cljs/main__init.class, cljs/main.clj or cljs/main.cljc on classpath.
I poked around a bit and there were some comments about issues with java 9 but I am running java 8. Any ideas?Hey @U0XTHMGMP, what does your current folder structure look like? and what does your static_website.cljs
look like?
I just switched over to Java 8 and it’s still working for me.
What is the -d option anyway? I do not see any documentation for it. https://clojure.org/reference/deps_and_cli When I take it off things seem to work fine.
Interesting. -d
is a ClojureScript compiler option: https://clojurescript.org/reference/compiler-options#output-dir allowing us to set the output dir of our compiled ClojureScript.
You can check out more options at the above link, or via command line:
clj -m cljs.main -h
You can for sure remove that flag, but if you do you should not be able to see a console log in the browser consoleHaving said the above, I am able to reproduce the error your specified. It happens for me if I run the following command
clj -m cljs.main -d "demo-clojurescript-gh-pages/out" -c demo.static-website -r
In a dir which does not have a deps.edn
fileInteresting, if the directory demo-clojurescript-gh-pages
is present there is no problem.
Yup. I wrote a footnote that hopefully explains this in greater detail because I figured it might not be clear https://betweentwoparens.com/deoploy-clojurescript-to-github-pages#fn-project-name
Let me know if you have any suggestions for how to make this clearer as I feel it is something that will come up more often than not. Suggestions and feedback are very welcome 🙂
It might be good to add a { :paths ["src"] ...
in the deps.edn. I think that is the default. Also from the instructions is sounds like the clj command should be run from the src/demo
directory.
Awesome. That makes sense and would explain what happened to you. I will update. Thank you!
I think the actual issue was that the deps.edn file had not yet been processed successfully. The unknown -d
option having prevented a successful first run. I think what did the trick was running clj -m cljs.main -h
which effectively retrieved clojurescript. I then created the "missing" directory and the next run succeeded.
Oh wow. That’s interesting. I cannot speak to your case, but I can say that I deleted all local versions of ClojureScript and noticed that even if I ran the clj -m cljs.main -d ...
command from the correct place, it would not download ClojureScript.
I then deleted each directory generated by clj
(because I still had the previously generated dirs from successful runs) out
, demo-clojurescript-gh-pages
and .cpcache
and identified that if a .cpcache
directory is present, ClojureScript will never (?) be downloaded (even if it is nowhere on the local). This includes if you run clj -m cljs.main -h
and also if :paths
is specified in deps.edn
.
In your case though, I would have to know where the commands were run. Either way, I def’ learned about some interesting behaviour 🙂
Yeah, that’s a good one too. I will post a more “best practices aligned” version of the demo in a few days to show how I might actually configure this if I was trying to maintain a static website and not just a demo
I recently did a video of using ClojureScript, figwheel-main, reagent and Bulma CSS framework for deployment on GitHub pages https://www.youtube.com/watch?v=nn_5NVgCps4&list=PLy9I_IfUBzKJSgctCJaRYcnF6kZdiZ5ku&index=23 Nice to see the different approaches.