stimulus_plumbers_tailwind 0.4.10 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7d463ce93d4a146dc768b94bb320d9ef9b1afa778e42517d46c57e9fd292195b
|
|
4
|
+
data.tar.gz: cbb766c87d6d9596accad585fe83ab53fe412465893edbe8c25385fdf5cc98c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6fc24962faaf989ec1dcafb749c35d2a04ae8140f38d773e75308bec99cfb60e61e24ea15ec9ee4b68732f1926b4b44d4e937d9f3ed9fbd36d974535b59c42eb
|
|
7
|
+
data.tar.gz: abae068679a332b2775ed0298dc02dd5e59d5a841cce7f8e71ba28c6231ce34c6bd5f32c2422236bf9c1cc8925183ef8601c2396f5dbdfebdc4f72b3b993eccd
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
---
|
|
6
|
+
## [0.4.10](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-tailwind/v0.4.9..stimulus-plumbers-tailwind/v0.4.10) - 2026-07-19
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- replace *_BASE with semantic parts ([#178](https://github.com/ryancyq/stimulus-plumbers/issues/178)) - ([9a29c0b](https://github.com/ryancyq/stimulus-plumbers/commit/9a29c0b5e804dea66d048d3058041c2cd6ccfe31)) - Ryan Chang
|
|
11
|
+
- install generator will copy css file from gem dir into app assets folder ([#179](https://github.com/ryancyq/stimulus-plumbers/issues/179)) - ([2e497f2](https://github.com/ryancyq/stimulus-plumbers/commit/2e497f2119b1c9aa22115c695d48ea4cdbeff9c2)) - Ryan Chang
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- form field, code + credit card ([#177](https://github.com/ryancyq/stimulus-plumbers/issues/177)) - ([d3adbab](https://github.com/ryancyq/stimulus-plumbers/commit/d3adbaba5ec345807162b03305d22a67ca3846dd)) - Ryan Chang
|
|
16
|
+
|
|
5
17
|
---
|
|
6
18
|
## [0.4.9](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-tailwind/v0.4.8..stimulus-plumbers-tailwind/v0.4.9) - 2026-07-18
|
|
7
19
|
|
data/docs/guide.md
CHANGED
|
@@ -16,12 +16,13 @@ the `STIMULUS_PLUMBERS_CSS_ENTRY` override are shared with the core gem — see
|
|
|
16
16
|
|
|
17
17
|
## Installed CSS files
|
|
18
18
|
|
|
19
|
-
The Tailwind installer
|
|
19
|
+
The Tailwind installer installs these CSS files and imports them relatively:
|
|
20
20
|
|
|
21
21
|
- `app/assets/stylesheets/stimulus_plumbers/tokens.css`
|
|
22
22
|
- `app/assets/stylesheets/stimulus_plumbers/tailwind/animations.css` — registers the indeterminate progress bar slide keyframe.
|
|
23
|
+
- `app/assets/builds/stimulus_plumbers/tailwind.css` — generated, git-ignored build artifact holding the gem `@source`, regenerated on every build.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
The first two files are application-owned: later generator runs restore a missing copy but never overwrite
|
|
25
26
|
an existing one. Legacy imports that point into gem directories are migrated to these app-local
|
|
26
27
|
paths.
|
|
27
28
|
|
|
@@ -66,12 +66,19 @@ module StimulusPlumbers
|
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def apply_sources_directive(css_file)
|
|
69
|
+
dir = File.dirname(css_file)
|
|
70
|
+
sources = File.join(destination_root, SourcesDirective::SOURCES_CSS_PATH)
|
|
71
|
+
|
|
72
|
+
# Remove legacy @source first so the import lands at the anchor, not in its place.
|
|
73
|
+
remove_lines(css_file, SourcesDirective.removal_pattern(from: dir))
|
|
69
74
|
apply_edit(
|
|
70
75
|
css_file,
|
|
71
|
-
SourcesDirective.
|
|
76
|
+
SourcesDirective.import_directive(from: dir, destination_root: destination_root),
|
|
72
77
|
anchor_pattern: SourcesDirective.anchor_pattern,
|
|
73
78
|
stale_pattern: SourcesDirective.stale_pattern
|
|
74
79
|
)
|
|
80
|
+
write_generated(sources, SourcesDirective.file_contents(from: File.dirname(sources)))
|
|
81
|
+
append_to_gitignore(sources)
|
|
75
82
|
end
|
|
76
83
|
end
|
|
77
84
|
end
|
|
@@ -8,20 +8,48 @@ module StimulusPlumbers
|
|
|
8
8
|
module SourcesDirective
|
|
9
9
|
GEM_NAME = "stimulus_plumbers_tailwind"
|
|
10
10
|
LIB_DIR = File.expand_path("../../..", __dir__)
|
|
11
|
+
SOURCES_CSS_PATH = "app/assets/builds/stimulus_plumbers/tailwind.css"
|
|
11
12
|
|
|
12
13
|
module_function
|
|
13
14
|
|
|
14
|
-
def
|
|
15
|
+
def import_directive(from:, destination_root:)
|
|
16
|
+
path = Pathname.new(destination_root).join(SOURCES_CSS_PATH)
|
|
17
|
+
rel = path.relative_path_from(Pathname.new(from))
|
|
18
|
+
rel = "./#{rel}" unless rel.to_s.start_with?(".", "/")
|
|
19
|
+
%(@import "#{rel}";)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def source_line(from:)
|
|
15
23
|
rel = Pathname.new(LIB_DIR).relative_path_from(Pathname.new(from))
|
|
16
24
|
%(@source "#{rel}/**/*.rb";)
|
|
17
25
|
end
|
|
18
26
|
|
|
27
|
+
def file_contents(from:)
|
|
28
|
+
<<~CSS
|
|
29
|
+
/*
|
|
30
|
+
* Auto-generated by stimulus_plumbers:tailwind:install.
|
|
31
|
+
* Holds a single @source pointing to the stimulus_plumbers_tailwind gem so the Tailwind CLI can scan its component class lists.
|
|
32
|
+
* The path is absolute to this machine, so this file is git-ignored and regenerated on assets:precompile / tailwindcss:build.
|
|
33
|
+
* Do not edit by hand.
|
|
34
|
+
*/
|
|
35
|
+
#{source_line(from: from)}
|
|
36
|
+
CSS
|
|
37
|
+
end
|
|
38
|
+
|
|
19
39
|
def anchor_pattern
|
|
20
40
|
%r{@import "tailwindcss"[^;]*;}
|
|
21
41
|
end
|
|
22
42
|
|
|
23
43
|
def stale_pattern
|
|
24
|
-
|
|
44
|
+
Regexp.union(
|
|
45
|
+
%r{@source "[^"]*#{Regexp.escape(GEM_NAME)}[^"]*";},
|
|
46
|
+
%r{@import "[^"]*#{Regexp.escape(SOURCES_CSS_PATH)}";},
|
|
47
|
+
%r{@import "[^"]*stimulus_plumbers/tailwind/sources\.css";}
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def removal_pattern(from:)
|
|
52
|
+
Regexp.union(stale_pattern, Regexp.new(Regexp.escape(source_line(from: from))))
|
|
25
53
|
end
|
|
26
54
|
end
|
|
27
55
|
end
|