Because the project is focused on using clojure, I think it would be more in line with it's goal to utilize the same language in process of developing the client-side part of the application. I've prepared a basic framework in the codebase to allow for relatively smooth development. It's available in my branch:
Open up /src-cljs/librarian_clojure/frontend.clj and /test-cljs/librarian_clojure/test/frontend.clj in your favourite editor (you may use clojure syntax highlighting for .cljs files). You may also want to open /resources/public/js/librarian.js to see the original code for conversion.
Work
Write a test in librarian-clojure.test.frontend
Refresh the browser. See the test fail
Write the code in librarian-clojure.frontend making the test pass
Refresh the browser. See the test pass!
Repeat.
The compiled version of the code is also attached to the app in resources/public/index.html.
So far, it doesn't do anything yet there.
Some simple tool/plugin doing page refresh every n seconds may come handy.
Update! Change in tests does not require touching the code in librarian-clojure.frontend anymore. I think that, as it stands, this could be pulled into upstream. A README update should follow.
Because the project is focused on using clojure, I think it would be more in line with it's goal to utilize the same language in process of developing the client-side part of the application. I've prepared a basic framework in the codebase to allow for relatively smooth development. It's available in my branch:
https://github.com/zoldar/librarian-clojure/tree/js-to-cljs
I assume a following workflow.
Startup
Work
The compiled version of the code is also attached to the app in resources/public/index.html. So far, it doesn't do anything yet there.
Some simple tool/plugin doing page refresh every n seconds may come handy.