-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Tailwindcss 3 and use via play cdn #36
Conversation
deps.edn
Outdated
|
||
;; needed for CSS jit pass | ||
babashka/process {:mvn/version "0.0.2"} | ||
io.github.nextjournal/cas {:git/url "git@github.com:nextjournal/cas" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn, this is a private repo :-( It can't be added to main deps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don’t understand why we would need that. Think we should just have the css locally, and uploading it should be an independent concern, same as we don’t upload the html files.
src/nextjournal/clerk.clj
Outdated
(when-not (fs/exists? (fs/parent "build/viewer.js")) | ||
(fs/create-dirs (fs/parent "build/viewer.js"))) | ||
(spit "build/viewer.js" ;; slurp latest build from CAS as configured in n.clerk.view | ||
(slurp (-> (io/file "src/nextjournal/clerk/view.clj") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s a much easier way to get to this, isn’t there? 😜
this assumes push rights to nextjournal CAS and a node environment capable of running tailwindcss. Also downloads js build from CAS as it's needed for tailwind to purge unused classes.
Just a side note on
in principle, now that we use tailwind from CDN, we'll only need a config in the invocation
within |
use stdin in tailwind cli for reading input from resource. Cleanup unused bb tasks.
if we use the same name the update will never take place since `viwer-css-path` will point at clerk's own resource.
5104436
to
659b3e6
Compare
This while it was like this before: |
Some styles are off wrt to main from the tailwind rework but we can maybe fix them in later steps? (left demo on main / right against this branch) Maybe I can try to fix results to |
avoid repeating not-prose / fix result inner viewer class
Upgrade tailwind to version 3 and switch to using the tailwind play cdn.
Also copy the viewer stylesheet in the resource path so it's available with the default deps (the viewers module is only a dev-time dependency).
viewer.css
from viewers in classpath whenbb dev
starts locally