add deps.edn
This commit is contained in:
parent
ad6ca6fb5e
commit
5275023b38
10 changed files with 170 additions and 9 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,7 +1,10 @@
|
||||||
/target
|
/target
|
||||||
/classes
|
/classes
|
||||||
/checkouts
|
/checkouts
|
||||||
pom.xml
|
.cpcache/
|
||||||
|
.rebel_readline_history
|
||||||
|
cljs-test-runner-out
|
||||||
|
node_modules
|
||||||
pom.xml.asc
|
pom.xml.asc
|
||||||
.repl*
|
.repl*
|
||||||
dev/resources/public/js/*
|
dev/resources/public/js/*
|
||||||
|
|
|
||||||
31
Makefile
Normal file
31
Makefile
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
.PHONY: clean test jar tag outdated install deploy tree repl
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf target
|
||||||
|
rm -rf classes
|
||||||
|
|
||||||
|
jar: clean test tag
|
||||||
|
clojure -A:jar
|
||||||
|
|
||||||
|
test: clean
|
||||||
|
clojure -X:test :patterns '[".*"]' # clojure tests
|
||||||
|
# clojure -Atest-cljs -r ".*test.self.host.*" # clojure script tests
|
||||||
|
# run "j8; boot test-cljs" until running cljs tests via deps.edn is fixed
|
||||||
|
|
||||||
|
outdated:
|
||||||
|
clojure -M:outdated
|
||||||
|
|
||||||
|
tag:
|
||||||
|
clojure -A:tag
|
||||||
|
|
||||||
|
install: jar
|
||||||
|
clojure -A:install
|
||||||
|
|
||||||
|
deploy: jar
|
||||||
|
clojure -A:deploy
|
||||||
|
|
||||||
|
tree:
|
||||||
|
mvn dependency:tree
|
||||||
|
|
||||||
|
repl:
|
||||||
|
clojure -A:dev -A:repl
|
||||||
|
|
@ -103,7 +103,7 @@ That is pretty much it. But wait, there is more.. this state is _a top level bei
|
||||||
`required` by other namespaces or in REPL:
|
`required` by other namespaces or in REPL:
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
dev=> (require '[app.nyse :refer [conn]])
|
dev=> (require '[app.db :refer [conn]])
|
||||||
nil
|
nil
|
||||||
dev=> conn
|
dev=> conn
|
||||||
#object[datomic.peer.LocalConnection 0x1661a4eb "datomic.peer.LocalConnection@1661a4eb"]
|
#object[datomic.peer.LocalConnection 0x1661a4eb "datomic.peer.LocalConnection@1661a4eb"]
|
||||||
|
|
|
||||||
10
build.boot
10
build.boot
|
|
@ -1,7 +1,17 @@
|
||||||
(def +version+ "0.1.18")
|
(def +version+ "0.1.18")
|
||||||
|
|
||||||
|
;; -- since boot is no more, this file will go away
|
||||||
|
;; -- once deps.edn "learns" how to run all cljs tests
|
||||||
|
|
||||||
|
;; j8; boot test
|
||||||
|
;; j8; boot test-cljs
|
||||||
|
;; j8; boot test-cljs-advanced
|
||||||
|
;; j8; boot -v build-jar push-snapshot
|
||||||
|
;; j8; boot -v build-jar push-release
|
||||||
|
|
||||||
(set-env!
|
(set-env!
|
||||||
:source-paths #{"src"}
|
:source-paths #{"src"}
|
||||||
|
:resource-paths #{"resources"}
|
||||||
:dependencies '[;; mount brings _NO DEPENDENCIES_, everything here is for
|
:dependencies '[;; mount brings _NO DEPENDENCIES_, everything here is for
|
||||||
;; mount dev, examples apps and tests
|
;; mount dev, examples apps and tests
|
||||||
|
|
||||||
|
|
|
||||||
52
deps.edn
Normal file
52
deps.edn
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
{:paths ["src" "resources"]
|
||||||
|
|
||||||
|
:deps {} ;; deps no deps
|
||||||
|
|
||||||
|
:aliases {:dev {:extra-deps {metosin/jsonista {:mvn/version "0.3.8"}
|
||||||
|
com.datomic/datomic-free {:mvn/version "0.9.5359"
|
||||||
|
:exclusions [joda-time/joda-time]}
|
||||||
|
org.clojure/tools.nrepl {:mvn/version "0.2.12"}
|
||||||
|
org.clojure/tools.namespace {:mvn/version "0.2.11"}
|
||||||
|
cheshire/cheshire {:mvn/version "5.5.0"}
|
||||||
|
compojure/compojure {:mvn/version "1.5.0"}
|
||||||
|
ring/ring-jetty-adapter {:mvn/version "1.1.0"}
|
||||||
|
robert/hooke {:mvn/version "1.3.0"}
|
||||||
|
proto-repl/proto-repl {:mvn/version "0.3.1"}
|
||||||
|
proto-repl-charts/proto-repl-charts {:mvn/version "0.3.2"}
|
||||||
|
nrepl/nrepl {:mvn/version "0.7.0"}}}
|
||||||
|
:test {:extra-paths ["test/core" "test/clj" "test/cljs" "test/resources"]
|
||||||
|
:extra-deps {com.datomic/datomic-free {:mvn/version "0.9.5359"
|
||||||
|
:exclusions [joda-time/joda-time]}
|
||||||
|
org.clojure/tools.nrepl {:mvn/version "0.2.12"}
|
||||||
|
robert/hooke {:mvn/version "1.3.0"}
|
||||||
|
org.clojure/tools.logging {:mvn/version "1.3.0"}
|
||||||
|
io.github.cognitect-labs/test-runner {:git/url "https://github.com/cognitect-labs/test-runner.git"
|
||||||
|
:sha "e7660458ce25bc4acb4ccc3e2415aae0a4907198"}}
|
||||||
|
:main-opts ["-m" "cognitect.test-runner"]
|
||||||
|
:exec-fn cognitect.test-runner.api/test}
|
||||||
|
:test-cljs {:extra-paths ["test/core" "test/cljs" "test/resources"]
|
||||||
|
:extra-deps {org.clojure/clojure {:mvn/version "1.8.0"}
|
||||||
|
org.clojure/clojurescript {:mvn/version "1.7.228"}
|
||||||
|
com.andrewmcveigh/cljs-time {:mvn/version "0.3.14"}
|
||||||
|
hiccups/hiccups {:mvn/version "0.3.0"}
|
||||||
|
datascript/datascript {:mvn/version "0.15.0"}
|
||||||
|
olical/cljs-test-runner {:mvn/version "3.8.1"}}
|
||||||
|
:main-opts ["-m" "cljs-test-runner.main"]}
|
||||||
|
:repl {:extra-paths ["dev/clj"]
|
||||||
|
:extra-deps {cider/cider-nrepl {:mvn/version "0.22.4"}
|
||||||
|
org.clojure/tools.logging {:mvn/version "1.2.4"}
|
||||||
|
com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
|
||||||
|
:main-opts ["-e" "(require 'dev)(in-ns 'dev)"
|
||||||
|
"-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"
|
||||||
|
"-i" "-f" "rebel-readline.main/-main"]}
|
||||||
|
:outdated {:extra-deps {olical/depot {:mvn/version "2.0.1"}}
|
||||||
|
:main-opts ["-m" "depot.outdated.main" "-a" "outdated"]}
|
||||||
|
:tag {:extra-deps {tolitius/tag {:mvn/version "0.1.7"}}
|
||||||
|
:main-opts ["-m" "tag.core" "tolitius/mount" "managing Clojure and ClojureScript app state since (reset)"]}
|
||||||
|
:jar {:extra-deps {seancorfield/depstar {:mvn/version "1.1.128"}}
|
||||||
|
:extra-paths ["target/about"]
|
||||||
|
:main-opts ["-m" "hf.depstar.jar" "target/mount.jar" "--exclude" "clojure/core/specs/alpha.*"]}
|
||||||
|
:deploy {:extra-deps {deps-deploy/deps-deploy {:mvn/version "RELEASE"}}
|
||||||
|
:main-opts ["-m" "deps-deploy.deps-deploy" "deploy" "target/mount.jar"]}
|
||||||
|
:install {:extra-deps {deps-deploy/deps-deploy {:mvn/version "RELEASE"}}
|
||||||
|
:main-opts ["-m" "deps-deploy.deps-deploy" "install" "target/mount.jar"]}}}
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
(ns dev
|
(ns dev
|
||||||
(:require [clojure.pprint :refer [pprint]]
|
(:require [clojure.pprint :refer [pprint]]
|
||||||
[clojure.tools.namespace.repl :as tn]
|
[clojure.tools.namespace.repl :as tn]
|
||||||
[boot.core :refer [load-data-readers!]]
|
|
||||||
[mount.core :as mount :refer [defstate]]
|
[mount.core :as mount :refer [defstate]]
|
||||||
[mount.tools.graph :refer [states-with-deps]]
|
[mount.tools.graph :refer [states-with-deps]]
|
||||||
[app.utils.logging :refer [with-logging-status]]
|
[app.utils.logging :refer [with-logging-status]]
|
||||||
|
|
@ -41,4 +40,11 @@
|
||||||
(tn/refresh :after 'dev/go))
|
(tn/refresh :after 'dev/go))
|
||||||
|
|
||||||
(mount/in-clj-mode)
|
(mount/in-clj-mode)
|
||||||
|
|
||||||
|
(defn load-data-readers!
|
||||||
|
"Refresh *data-readers* with readers from newly acquired dependencies."
|
||||||
|
[]
|
||||||
|
(#'clojure.core/load-data-readers)
|
||||||
|
(set! *data-readers* (.getRawRoot #'*data-readers*)))
|
||||||
|
|
||||||
(load-data-readers!)
|
(load-data-readers!)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
(ns proto-play
|
(ns proto-play
|
||||||
(:require [mount.tools.graph :as mount]
|
(:require [mount.tools.graph :as mg]
|
||||||
[proto-repl-charts.graph :as proto]))
|
[proto-repl-charts.graph :as proto]))
|
||||||
|
|
||||||
(defn mount->proto [graph]
|
(defn mount->proto [graph]
|
||||||
|
|
@ -10,6 +10,6 @@
|
||||||
{}
|
{}
|
||||||
graph))
|
graph))
|
||||||
|
|
||||||
(->> (mount/states-with-deps)
|
(->> (mg/states-with-deps)
|
||||||
mount->proto
|
mount->proto
|
||||||
(proto/graph "a proto graph of mount states"))
|
(proto/graph "a proto graph of mount states"))
|
||||||
|
|
|
||||||
10
package.json
10
package.json
|
|
@ -8,14 +8,16 @@
|
||||||
"url": "https://github.com/tolitius/mount"
|
"url": "https://github.com/tolitius/mount"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"name" : "tolitius",
|
"name": "tolitius",
|
||||||
"url" : "http://www.dotkam.com"
|
"url": "http://www.dotkam.com"
|
||||||
}
|
},
|
||||||
,
|
|
||||||
"files": [
|
"files": [
|
||||||
"src/*"
|
"src/*"
|
||||||
],
|
],
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "src"
|
"lib": "src"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ws": "^8.16.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
45
pom.xml
Normal file
45
pom.xml
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<groupId>mount</groupId>
|
||||||
|
<artifactId>mount</artifactId>
|
||||||
|
<version>0.1.19-SNAPSHOT</version>
|
||||||
|
<name>mount</name>
|
||||||
|
<description>managing Clojure and ClojureScript app state since (reset)</description>
|
||||||
|
<url>https://github.com/tolitius/mount</url>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Eclipse Public License</name>
|
||||||
|
<url>http://www.eclipse.org/legal/epl-v10.html</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<name>tolitius</name>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
<scm>
|
||||||
|
<url>https://github.com/tolitius/mount</url>
|
||||||
|
<connection>scm:git:git://github.com/tolitius/mount.git</connection>
|
||||||
|
<developerConnection>scm:git:ssh://git@github.com/tolitius/mount.git</developerConnection>
|
||||||
|
<tag>HEAD</tag>
|
||||||
|
</scm>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.clojure</groupId>
|
||||||
|
<artifactId>clojure</artifactId>
|
||||||
|
<version>1.11.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<sourceDirectory>src</sourceDirectory>
|
||||||
|
</build>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>clojars</id>
|
||||||
|
<url>https://repo.clojars.org/</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
</project>
|
||||||
|
|
@ -5,12 +5,24 @@
|
||||||
mount.test.fun-with-values
|
mount.test.fun-with-values
|
||||||
mount.test.private-fun
|
mount.test.private-fun
|
||||||
mount.test.printing
|
mount.test.printing
|
||||||
|
mount.test.parts
|
||||||
|
mount.test.cleanup-dirty-states
|
||||||
|
mount.test.stop-except
|
||||||
|
mount.test.start-without
|
||||||
|
mount.test.start-with
|
||||||
|
mount.test.start-with-states
|
||||||
))
|
))
|
||||||
|
|
||||||
(t/run-tests
|
(t/run-tests
|
||||||
'mount.test.fun-with-values
|
'mount.test.fun-with-values
|
||||||
'mount.test.private-fun
|
'mount.test.private-fun
|
||||||
'mount.test.printing
|
'mount.test.printing
|
||||||
|
'mount.test.parts
|
||||||
|
'mount.test.cleanup-dirty-states
|
||||||
|
;; 'mount.test.stop-except ;; TODO: can't run with deps.edn (due to "WebSocket is not defined")
|
||||||
|
;; 'mount.test.start-with ;; boot, lein have no problems
|
||||||
|
;; 'mount.test.start-with-states ;; most likely somm misconfigured in node..
|
||||||
|
'mount.test.start-without
|
||||||
)
|
)
|
||||||
|
|
||||||
(defn run-tests []
|
(defn run-tests []
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue