Điểm qua phoenixframework/tailwind: 507 sao trên GitHub, viết chủ yếu bằng Elixir. An installer for tailwind
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Mix tasks for installing and invoking tailwindcss via the
stand-alone tailwindcss cli
Installation
If you are going to build assets in production, then you add
tailwind as dependency on all environments but only start it
in dev:
def deps do
[
{:tailwind, "~> 0.3", runtime: Mix.env() == :dev}
]
end
Once installed, change your config/config.exs to pick your
Tailwind version of choice:
config :tailwind, version: "4.3.0"
Note that :tailwind 0.3+ assumes Tailwind v4+ by default.
It still supports Tailwind v3, but some configuration options
when setting up a new project might be different. If you use
Tailwind v3, also have a look at the README in the 0.2 branch.
Now you can install Tailwind by running:
$ mix tailwind.install
or if your platform isn't officially supported by Tailwind,
you can supply a third party path to the binary the installer wants
(beware that we cannot guarantee the compatibility of any third party executable):
Now you don't need the Tailwind binary and you can remove the
vendored JS files: rm assets/vendor/daisy*
Profiles
The first argument to tailwind is the execution profile.
You can define multiple execution profiles with the current
directory, the OS environment, and default arguments to the
tailwind task in your config/config.exs:
When mix tailwind default is invoked, the task arguments will be appended
to the ones configured above.
Adding to Phoenix
Note that applications generated with Phoenix older than 1.8 still use Tailwind v3 by default.
If you're using Tailwind v3 please refer to the README in the v0.2 branch
instead.
To add Tailwind v4 to an application using Phoenix, first add this package
as a dependency in your mix.exs:
def deps do
[
{:phoenix, "~> 1.8"},
{:tailwind, "~> 0.3", runtime: Mix.env() == :dev}
]
end
Also, in mix.exs, add tailwind to the assets.deploy
alias for deployments (with the --minify option):
Now let's change config/config.exs to tell tailwind
to build our css bundle into priv/static/assets/css.
We'll also give it our assets/css/app.css as our css entry point:
We also strongly recommend setting up the @source paths in your in app.css
file to watch assets/css, assets/js and lib/YOUR_APP_web, as above.
Without those, too many files (including build artifacts) may be watched,
leading to frequent recompilations.
Updating from Tailwind v3 to v4
For a typical Phoenix application, updating from Tailwind v3 to v4 requires the following steps:
Follow the Tailwind v4 upgrade guide to address deprecations.
Optional: remove the tailwind.config.js and switch to the new CSS based configuration. For more information, see the previously mentioned upgrade guide and the documentation on functions and directives.
License
Copyright (c) 2022 Chris McCord.
Copyright (c) 2021 Wojtek Mach, José Valim.
tailwind source code is licensed under the MIT License.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/phoenixframework/tailwind là nguồn chính thức.
phoenixframework/tailwind có bao nhiêu sao?
phoenixframework/tailwind có 507 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/phoenixframework/tailwind. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
phoenixframework/tailwind có phải mã nguồn mở không?
Có — phoenixframework/tailwind phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/phoenixframework/tailwind.
phoenixframework/tailwind có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho phoenixframework/tailwind. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
phoenixframework/tailwind là gì?
phoenixframework/tailwind (phoenixframework/tailwind) là dự án Elixir trên GitHub. Theo mô tả gốc: An installer for tailwind
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về tailwind?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về tailwind.