kit-clj / modules Goto Github PK
View Code? Open in Web Editor NEWOfficial Kit modules
Home Page: https://kit-clj.github.io/
Official Kit modules
Home Page: https://kit-clj.github.io/
The default build.clj file is using commands that won't work on windows. This happens with the cljs module.
This is the line put in to build.clj
(defn build-cljs [] (println "npx shadow-cljs release app...") (let [{:keys [exit], :as s} (sh "npx" "shadow-cljs" "release" "app")] (when-not (zero? exit) (throw (ex-info "could not compile cljs" s))) (sh "cp" "-r" "target/classes/cljsbuild/public" "target/classes/")))
(sh "npx" "shadow-cljs" "release" "app")
Should be replaced with (babashka.process/shell "npx shadow-cljs release app")
.
(sh "cp" "-r" "target/classes/cljsbuild/public" "target/classes/")
should be replaced with (babashka.fs/copy-tree "target/classes/cljsbuild/public" "target/classes")
Not sure if there's a way to use app.js that I'm not doing, but currently, the public folder is copied from
target/classes/cljsbuild/public
to
target/classes/
But it looks like the public folder is supposed to be target/classes/public
.
Is this a mistake? My built uberjar can't import app.js
unless I change that path
I see that we have both ctmx and htmx module, ctmx basically being an example on top of htmx module.
@whamtet maybe it would make sense to refactor ctmx module to extend from htmx module and add only additional assets, instead of duplicating?
Just observed strange behaviour after installing :kit/htmx module.
The following snipped is added to system.edn
:reitit.routes/ui {:base-path "",
:env #ig/ref :system/env}
See ,
that is added after :base-path
although it is not there in module config.edn
. Nt sure if it's a bug though, since comma is a valid edn delimiter, but looks a bit strange.
Also, trying to (reset)
from the repl of running application ends up with the following errors in console:
user=> (reset)
:reloading (marko.ttt3.routes.ui)
:error-while-loading marko.ttt3.routes.ui
Execution error (IllegalStateException) at clojure.tools.namespace.repl/recover-ns (repl.clj:77).
start-app already refers to: #'marko.ttt3.core/start-app in namespace: user
user=>
Running first (halt)
and then (go)
seems to work properly.
The strange thing here is that the exact same code is running properly when I manually create ui.clj
file, and shows the above error when the file is created by kit/install-module
.
Maybe it's something about my system (Windows using both cmd and mingw, editors Sublime Text and Emacs).
@yogthos @nikolap can you please check if this is something kit
related, since at the moment I'm completely lost on this one.
I'm wondering if that would perhaps make version syncing and deployment easier?
Like kit modules could be expected to have a file in their jar kit/$module/$module.kit.edn
or something that defines these transformations?
It would be useful to have a module that hooks in basic auth functionality in Kit using Buddy https://github.com/funcool/buddy-auth
I wonder if the destination path on this line should perhaps be .../web/middleware/auth.clj
? (i.e. not in routes directory)
Line 4 in defba54
I identified an issue when I installed both modules.
{hiccup/hiccup {:mvn/version "1.0.5"}}
hiccup/hiccup {:mvn/version "2.0.0-alpha2"}
It causes the project to break with the next error:
Could not locate hiccup2/core__init.class, hiccup2/core.clj
I fixed it by upgrading the dependency on my deps.edn
to the newest version of hiccup
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.