Commit be95b05
committed
Allow customizing input/output via env variables
The Rails `assets:precompile` task internally calls `bin/rails tailwindcss:build`,
which uses hardcoded input/output file paths. Previously, the only way to
customize these paths was to bypass the Rails integration entirely and use
the Tailwind CLI directly (via `bundle exec tailwindcss`).
This change introduces TAILWINDCSS_INPUT_FILE and TAILWINDCSS_OUTPUT_FILE
environment variables that allow users to override the default paths while
still using the standard `assets:precompile` workflow.
This is useful for projects with non-standard asset structures or when
integrating with custom build pipelines.1 parent 7fb4975 commit be95b05
File tree
2 files changed
+38
-2
lines changed- lib/tailwindcss
- test/lib/tailwindcss
2 files changed
+38
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | | - | |
13 | | - | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
98 | 123 | | |
99 | 124 | | |
100 | 125 | | |
| |||
0 commit comments