Skip to content
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

Download and install tailwindcss binary without opam #2718

Merged
merged 8 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
(rule
(target main.css)
(deps
%{workspace_root}/tool/tailwind/tailwindcss
(:config %{workspace_root}/tailwind.config.js)
(:input %{workspace_root}/src/ocamlorg_frontend/css/styles.css)
(source_tree %{workspace_root}/src/ocamlorg_frontend))
(action
(chdir
%{workspace_root}
(run tailwindcss -m -c %{config} -i %{input} -o %{target})))))
(run %{workspace_root}/tool/tailwind/tailwindcss -m -c %{config} -i %{input} -o %{target})))))

(subdir
asset/
Expand Down
12 changes: 11 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
(>= 2.0.0))
yojson
lwt
tailwindcss
(hilite
(>= 0.4.0))
(river
Expand All @@ -75,3 +74,14 @@
(>= 1.1.0))
xmlm
uri))

(pin
(url
"git+https://github.com/aantron/river#476dc945a908a69548bddd267f143a3e5d9c8a1a")
(package
(name river)))

(pin
(url "git+https://github.com/tarides/olinkcheck")
(package
(name olinkcheck)))
19 changes: 0 additions & 19 deletions dune-workspace

This file was deleted.

2 changes: 0 additions & 2 deletions ocamlorg.opam
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ depends: [
"timedesc" {>= "2.0.0"}
"yojson"
"lwt"
"tailwindcss"
"hilite" {>= "0.4.0"}
"river" {>= "0.3"}
"syndic"
Expand Down Expand Up @@ -71,6 +70,5 @@ build: [
dev-repo: "git+https://github.com/ocaml/ocaml.org.git"
pin-depends: [
["river.dev" "git+https://github.com/aantron/river#476dc945a908a69548bddd267f143a3e5d9c8a1a"]
["tailwindcss.dev" "https://github.com/tmattio/opam-tailwindcss/archive/3e60fc32bbcf82525999d83ad0f395e16107026b.tar.gz"]
["olinkcheck.~dev" "git+https://github.com/tarides/olinkcheck"]
]
1 change: 0 additions & 1 deletion ocamlorg.opam.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pin-depends: [
["river.dev" "git+https://github.com/aantron/river#476dc945a908a69548bddd267f143a3e5d9c8a1a"]
["tailwindcss.dev" "https://github.com/tmattio/opam-tailwindcss/archive/3e60fc32bbcf82525999d83ad0f395e16107026b.tar.gz"]
["olinkcheck.~dev" "git+https://github.com/tarides/olinkcheck"]
]
79 changes: 79 additions & 0 deletions tool/tailwind/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
(rule
(target tailwindcss-linux-x64)
(action
(progn
(run
curl
-sLO
https://github.com/tailwindlabs/tailwindcss/releases/download/v3.3.6/%{target})
(run chmod +x %{target}))))

(rule
(target tailwindcss-linux-arm64)
(action
(progn
(run
curl
-sLO
https://github.com/tailwindlabs/tailwindcss/releases/download/v3.3.6/%{target})
(run chmod +x %{target}))))

(rule
(target tailwindcss-macos-x64)
(action
(progn
(run
curl
-sLO
https://github.com/tailwindlabs/tailwindcss/releases/download/v3.3.6/%{target})
(run chmod +x %{target}))))

(rule
(target tailwindcss-macos-arm64)
(action
(progn
(run
curl
-sLO
https://github.com/tailwindlabs/tailwindcss/releases/download/v3.3.6/%{target})
(run chmod +x %{target}))))

(rule
(enabled_if
(and
(= %{architecture} amd64)
(= %{system} linux)))
(target tailwindcss)
(deps tailwindcss-linux-x64)
(action
(copy %{deps} tailwindcss)))

(rule
(enabled_if
(and
(= %{architecture} arm64)
(= %{system} linux)))
(target tailwindcss)
(deps tailwindcss-linux-arm64)
(action
(copy %{deps} tailwindcss)))

(rule
(enabled_if
(and
(= %{architecture} amd64)
(= %{system} macosx)))
(target tailwindcss)
(deps tailwindcss-macos-x64)
(action
(copy %{deps} tailwindcss)))

(rule
(enabled_if
(and
(= %{architecture} arm64)
(= %{system} macosx)))
(target tailwindcss)
(deps tailwindcss-macos-arm64)
(action
(copy %{deps} tailwindcss)))
Loading