|
1 | 1 | defmodule Tailwind do
|
2 | 2 | # https://github.com/tailwindlabs/tailwindcss/releases
|
3 |
| - @latest_version "4.0.9" |
| 3 | + @latest_version "4.1.11" |
4 | 4 |
|
5 | 5 | @moduledoc """
|
6 | 6 | Tailwind is an installer and runner for [tailwind](https://tailwindcss.com/).
|
@@ -44,26 +44,28 @@ defmodule Tailwind do
|
44 | 44 | it (for example, GitHub behind a proxy), you may want to
|
45 | 45 | set the `:path` to a configurable system location.
|
46 | 46 |
|
47 |
| - For instance, you can install `tailwind` globally with `npm`: |
| 47 | + For instance, you can install `tailwind` and its CLI tool with `npm`. |
48 | 48 |
|
49 |
| - $ npm install -g tailwindcss |
| 49 | + From `/assets`: |
50 | 50 |
|
51 |
| - On Unix, the executable will be at: |
| 51 | + $ npm install tailwindcss @tailwindcss/cli |
52 | 52 |
|
53 |
| - NPM_ROOT/tailwind/node_modules/tailwind-TARGET/bin/tailwind |
| 53 | + Then adjust your configuration: |
54 | 54 |
|
55 |
| - On Windows, it will be at: |
56 |
| -
|
57 |
| - NPM_ROOT/tailwind/node_modules/tailwind-windows-(32|64)/tailwind.exe |
58 |
| -
|
59 |
| - Where `NPM_ROOT` is the result of `npm root -g` and `TARGET` is your system |
60 |
| - target architecture. |
61 |
| -
|
62 |
| - Once you find the location of the executable, you can store it in a |
63 |
| - `MIX_TAILWIND_PATH` environment variable, which you can then read in |
64 |
| - your configuration file: |
65 |
| -
|
66 |
| - config :tailwind, path: System.get_env("MIX_TAILWIND_PATH") |
| 55 | + config :tailwind, |
| 56 | + # check if in sync with /assets/package.json |
| 57 | + version: "#{@latest_version}", |
| 58 | + default: [ |
| 59 | + args: ~w( |
| 60 | + --input=css/app.css |
| 61 | + --output=../priv/static/assets/app.css |
| 62 | + ), |
| 63 | + cd: Path.expand("../assets", __DIR__), |
| 64 | + ], |
| 65 | + # skip executable check/download |
| 66 | + version_check: false, |
| 67 | + # path to npm managed CLI tool |
| 68 | + path: Path.expand("../assets/node_modules/.bin/tailwindcss", __DIR__) |
67 | 69 |
|
68 | 70 | """
|
69 | 71 |
|
|
0 commit comments