diff --git a/bb.edn b/bb.edn index 4a4c9940..b9c166a5 100644 --- a/bb.edn +++ b/bb.edn @@ -34,28 +34,33 @@ [babashka.fs :as fs]] test {:doc "Test" :task (run-process (fn [] - (-> (p/process ["clj" "-M:runner"] - (to-out)))))} + (p/process ["clj" "-M:runner"] + (to-out))))} lint {:doc "Lint" :task (run-process (fn [] - (-> (p/process ["clj-kondo" - "--lint" - "src/clj" "src/cljc" - ;"resources" - "env/dev/src/clj" "env/dev/resources" - ;"env/dev/src/cljc" - "test/clj" "test/cljc" "test/resources"] - (to-out)))))} + (p/process ["clj-kondo" + "--lint" + "src/clj" "src/cljc" + ;"resources" + "env/dev/src/clj" + "env/dev/resources" + "env/test/resources" + ;"env/test/src/clj" + ;"env/test/src/cljc" + ;"env/dev/src/cljc" + "test/clj" "test/cljc" + "test/resources"] + (to-out))))} repl {:doc "Repl" :task (run-process (fn [] - (-> (p/process ["clj" "-M:repl"] - (to-out)))))} - #_(comment - test-frontend {:doc "Test frontend" - :task (run-process (fn [] - (-> (p/process ["npm" "install"] - (to-out))) - (-> (p/process ["npx" "shadow-cljs" "compile" "karma-test"] - (to-out))) - (-> (p/process ["npx" "karma" "start" "--single-run"] - (to-out)))))})}} + (p/process ["clj" "-M:repl"] + (to-out))))} + ;; (test-frontend {:doc "Test frontend" + ;; :task (run-process (fn [] + ;; (-> (p/process ["npm" "install"] + ;; (to-out))) + ;; (-> (p/process ["npx" "shadow-cljs" "compile" "karma-test"] + ;; (to-out))) + ;; (-> (p/process ["npx" "karma" "start" "--single-run"] + ;; (to-out)))))}) + }} diff --git a/deps.edn b/deps.edn index 699cf7a4..51a41da8 100644 --- a/deps.edn +++ b/deps.edn @@ -19,7 +19,7 @@ :aliases {:cljs-paths {:extra-paths []} :repl {:extra-paths ["env/dev/src/clj" "env/dev/src/cljc" "env/dev/resources" "test/clj" "test/cljc" "test/resources"] - :main-opts ["-m" "automaton-core.core"], + :main-opts ["-m" "automaton-core.repl-core"], :jvm-opts ["-Dlog4j2.configurationFile=log4j2.xml" "-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory" "-Dclojure.spec.compile-asserts=true"], @@ -32,6 +32,7 @@ :sha "7284cda41fb9edc0f3bc6b6185cfb7138fc8a023"}, org.clojure/tools.reader #:mvn{:version "1.3.6"}}, :extra-paths ["env/dev/src/clj" "env/dev/src/cljc" "env/dev/resources" + "env/test/resources" "test/clj" "test/cljc" "test/resources"] :jvm-opts ["-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory" "-Dlog4j.configurationFile=log4j2-silent.xml"], diff --git a/env/dev/src/clj/automaton_core/repl_core.clj b/env/dev/src/clj/automaton_core/repl_core.clj new file mode 100644 index 00000000..ec39bf57 --- /dev/null +++ b/env/dev/src/clj/automaton_core/repl_core.clj @@ -0,0 +1,24 @@ +(ns automaton-core.repl-core + "Gather all components to app + This core is for test only, if you need a repl running only automaton-core code" + (:require + [automaton-core.configuration.core] + [automaton-core.i18n.language.lang-core] + [automaton-core.repl :as core-repl] + [automaton-core.i18n.translate.translate-core] + [automaton-core.log :as log] + [mount.core :as mount] + [clojure.core.async :refer [go chan - logs/ + tmp/logs/ diff --git a/src/clj/automaton_core/adapters/build_config.clj b/src/clj/automaton_core/adapters/build_config.clj index 8cfcb109..3db6fe43 100644 --- a/src/clj/automaton_core/adapters/build_config.clj +++ b/src/clj/automaton_core/adapters/build_config.clj @@ -15,12 +15,14 @@ Useful to discover applications Search in the local directory, useful for application repo and in subdir, useful for monorepo + + It is important not to search everywehere in the paths as `tmp` directories may contains unwanted `build_config.edn` files Params: * none Returns the list of directories with `build_config.edn` in it" ([config-path] (->> (files/search-files config-path - (str "**" build-config-filename)) + (str "{*/" build-config-filename ",*/*/" build-config-filename "}")) flatten (filter (comp not nil?)))) ([] (search-for-build-config "")))