Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Detailed instructions for nodejs tailwindcss

未关闭
#88 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
文档
描述清晰度
需要澄清
活跃度
停滞
技术栈
elixir, nodejs, tailwindcss

调研方向

Start with the Tailwind configuration in config/config.ex and the aliases block shown in the issue, then verify the Node-based commands with npx tailwindcss on FreeBSD. Document the Phoenix-specific setup, including the existing tailwind.config.js and input/output paths, so a fresh project can complete setup and assets.build successfully without the Tailwind Mix installer.

由索引模型根据 Issue 内容生成。

描述

I apologize upfront for stupid question. I come from systems & backend engineering world, the world of frontend is new and frightening to me. I am trying to get started with Phoenix on FreeBSD.

I am aware of #49 , however this option has big drawback: there are are no official tailwind cli packages for FreeBSD and current package is outdated, maintained by a single person and relies on a complicated series of dirty hacks to get it working. (All thanks to convoluted build process of the tailwindcss CLI)

As I gather from the readme it is possible to use tailwindcss with nodejs:

For third-party Tailwind plugin support (e.g. DaisyUI), the node package must be used. See the Tailwind Node.js installation instructions if you require third-party plugin support.

However official tailwind documentation gives very generic guidance how to install it. Following those steps verbatim does not produce working result.

Can you please provide more detailed and tailored to phoenix steps?

I do have node and tailwind installed. npx tailwindcss works. As I understand tailwind mix dependency should not be needed, or at least should be reconfigured. I want to re-use auto-generated tailwind.config.js.

This snippet from config/config.ex hints on what input/output paths should be but I would appreciate official step-by-step getting started instruction for a web monkey like me.

# Configure tailwind (the version is required)
config :tailwind,
  version: "3.2.7",
  default: [
    args: ~w(
      --config=tailwind.config.js
      --input=css/app.css
      --output=../priv/static/assets/app.css
    ),
    cd: Path.expand("../assets", __DIR__)
  ]

P.S. It seems that this bit has to be adjusted to run npx tailwind instead...

  defp aliases do
    [
      setup: ["deps.get", "assets.setup", "assets.build"],
      "assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
      "assets.build": ["tailwind default", "esbuild default"],
      "assets.deploy": ["tailwind default --minify", "esbuild default --minify", "phx.digest"]
    ]
  end
主要语言
Elixir
星标
508
派生
70
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

phoenixframework/tailwind 的其他 Issue

查看 phoenixframework/tailwind 的全部 Issue

相似的 Issue

更多 Elixir Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。