Stub code, build, and REPL.
Signed-off-by: Richard Newman <rnewman@twinql.com>
This commit is contained in:
parent
f7621712df
commit
9e3df19798
6 changed files with 40 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,6 +17,7 @@
|
|||
/classes/
|
||||
/lib/
|
||||
/node_modules/
|
||||
/out/
|
||||
/target/
|
||||
pom.xml
|
||||
pom.xml.asc
|
||||
|
|
11
BUILDING.md
Normal file
11
BUILDING.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
## Getting `rlwrap`
|
||||
|
||||
```
|
||||
brew install rlwrap
|
||||
```
|
||||
|
||||
## To run a REPL
|
||||
|
||||
```
|
||||
rlwrap lein run -m clojure.main repl.clj
|
||||
```
|
6
node.clj
Normal file
6
node.clj
Normal file
|
@ -0,0 +1,6 @@
|
|||
(require 'cljs.build.api)
|
||||
|
||||
(cljs.build.api/build "src"
|
||||
{:main 'datomish.core
|
||||
:output-to "main.js"
|
||||
:target :nodejs})
|
|
@ -3,4 +3,4 @@
|
|||
:url "https://github.com/mozilla/datomish"
|
||||
:license {:name "Mozilla Public License Version 2.0"
|
||||
:url "https://github.com/mozilla/datomish/blob/master/LICENSE"}
|
||||
:dependencies [[org.clojure/clojure "1.8.0"]])
|
||||
:dependencies [[org.clojure/clojurescript "1.9.89"]])
|
||||
|
|
12
repl.clj
Normal file
12
repl.clj
Normal file
|
@ -0,0 +1,12 @@
|
|||
(require 'cljs.repl)
|
||||
(require 'cljs.build.api)
|
||||
(require 'cljs.repl.node)
|
||||
|
||||
(cljs.build.api/build "src"
|
||||
{:main 'datomish.core
|
||||
:output-to "out/main.js"
|
||||
:verbose true})
|
||||
|
||||
(cljs.repl/repl (cljs.repl.node/repl-env)
|
||||
:watch "src"
|
||||
:output-dir "out")
|
9
src/datomish/core.cljs
Normal file
9
src/datomish/core.cljs
Normal file
|
@ -0,0 +1,9 @@
|
|||
(ns datomish.core
|
||||
(:require [cljs.nodejs :as nodejs]))
|
||||
|
||||
(nodejs/enable-util-print!)
|
||||
|
||||
(defn -main [& args]
|
||||
(println "Hello world!"))
|
||||
|
||||
(set! *main-cli-fn* -main)
|
Loading…
Reference in a new issue