my new starter project for creating a todo list app with re-frame and firebase: https://widdindustries.com/clojurescript-firebase-simple/. feedback welcome 🙂
😉 in the old days you felt like you'd really achieved something when you got to hello world with things like public static void main..
.
clj -e '(println "Hello, world")'
is just boring
Your code and blog post has been a huge help for me in setting up firebase auth for my own project, so thank you so much! However, I’m borrowing aspects from yours as well as from the source code of the deg/re-frame-firebase library, and am having trouble with compiling using default compiler optimizations :advanced
. It apparently removes too much of the js code so that I get messages like Cannot read property 'getIdToken' of null
because firebase doesn’t initialize properly. Works fine fith :simple
optimizations, and I’ve tried adding ^js
hints in the same places as your code does, which helped with a few of the errors but not all.
Any suggestions what I could try?
More specifically, it actually seems to initialize firebase, but fails to initialize the google sign-in constructor. firebase.auth.Xx is not a constructor
Following the directions at https://shadow-cljs.github.io/docs/UsersGuide.html#externs I just tried creating an externs/app.txt file and added a single line with the word GoogleAuthProvider
and that seems to have done the trick! Now that constructor keeps its name instead of being renamed to Xx
.
I still don’t know why that specific name couldn’t be auto-inferred, but the solution/workaround is so simple that I can live with it:)
Glad you got it sorted. As I have it in my project, that line is (`js/firebase.auth.GoogleAuthProvider.)` , so has no hint. I imagine in that case bc the compiler sees it refers to a global object it is left as is.
I think this belongs to #news-and-articles — this channel is for project/library announcements only
ok thanks
I guess it does announce a starter project for cljs+firebase but point taken
Is the “todo app” the “hello world” of the 21st century?
https://clojure.org/releases/tools#v1.10.2.790 is now available
• Add -version and --version options (same as java)
• https://clojure.atlassian.net/browse/TDEPS-56 - Fix main-opts and jvm-opts word splitting on spaces (goodbye Corfield comma!)
• https://clojure.atlassian.net/browse/TDEPS-125 - Use JAVA_CMD if set (thanks Gregor Middell!)
• Add warning if :paths
or :extra-paths
refers to a directory outside the project root (in the future will become an error)
Are you tired of web browsers pushing you around? Dictating your workflow? Requiring your tools to run in the browser rather than the other way around? Take control with https://github.com/phronmophobic/clj-cef, Clojure bindings for the Chromium Embedded Framework. * Embed an HTML5-compliant Web browser control in an existing native application. * Create a light-weight native “shell” application that hosts a user interface developed primarily using Web technologies. * Render Web content “off-screen” in applications that have their own custom drawing frameworks. * Act as a host for automated testing of existing Web properties and applications. All from the comfort of your local repl. Act now, and get anhttps://github.com/phronmophobic/clj-cef/tree/main/examples/htmltoimage absolutely free! https://github.com/phronmophobic/clj-cef
Apache2 License terms and conditions may apply. Mac OSX only. Incorrect usage may crash your jvm.