Closed zane closed 5 years ago
I looked over the diff. Looks fine to me. This message constitutes my review.
Modifies metaprob.state and metaprob.state-test to be valid Clojure / ClojureScript and renames them from .clj to .cljc. .cljc is the extension Clojure tooling expects for cross-compileable Clojure code.
Were there any changes to metaprob.state
to make it valid Clojure/ClojureScript? It looks like the renaming was all that happened? (If so, that's awesome!) The diff looks good to me :+1:
@alex-lew Yep! No changes for this one! That, along with the fact that it has no dependencies of its own, is why I started with it. ☺️
Speaks to #14
What does this do?
Adds support for compiling the
metaprob.state
andmetaprob.state-test
namespaces to JavaScript via the ClojureScript compiler:metaprob.state
andmetaprob.state-test
to be valid Clojure / ClojureScript and renames them from*.clj
to*.cljc
..cljc
is the extension Clojure tooling expects for cross-compileable Clojure code.cljstest
make
target that runs a new ClojureScript test suite (currently just the tests inmetaprob.state-test
).test
make
target to also run the new ClojureScript test suite..gitignore
file for JavaScript artifacts generated by the ClojureScript compiler..gitignore
.cljsclean
make
target that destroys JavaScript artifacts generated by the ClojureScript compiler.What are the pros and cons of this?
Pros
Allows us to compile these namespaces to ClojureScript.
Cons
Increases the complexity of the system.
How do I test this?
make test
(or, to just run the ClojureScript tests,make cljstest
).clj -Acljs -m cljs.main -re nashorn --repl
(or-re node
if your system has node installed, and try requiring and working interactively withmetaprob.state
at the REPL: