avo 4.0.0.beta.28 → 4.0.0.beta.29
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/avo/tailwind_builder.rb +11 -8
- data/lib/avo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a1a5c19c70ef8b77daa3b3637c476ac93503afa04b76b1dbda103fe92e13124
|
|
4
|
+
data.tar.gz: d0013add4d995da4df46810876314782006c5a078e6c55c8650f9d144960d97a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9e856c1e1d37d95bc956000dc0754150753c020d942bfb9bf9c6f5352cbc3581fb0e6dd60367f87ee86bcb5e8aed28b2d759c12013b735a859f4faa46a710a3
|
|
7
|
+
data.tar.gz: 5a4c2f9ba469285a911174228444123bf32e65da9f3c58f1b00e5a406a818e26eef033e86231d52611a1bee3aa0e1765206321d9687ac0782aa573a8c247f4ae
|
data/Gemfile.lock
CHANGED
data/lib/avo/tailwind_builder.rb
CHANGED
|
@@ -75,7 +75,7 @@ module Avo
|
|
|
75
75
|
lines = []
|
|
76
76
|
|
|
77
77
|
# Include Avo itself (the core engine) in Tailwind's scan paths.
|
|
78
|
-
lines << %(@source "#{
|
|
78
|
+
lines << %(@source "#{tailwind_path(Avo::Engine.root)}";)
|
|
79
79
|
append_engine_stylesheets(lines, Avo::Engine.root)
|
|
80
80
|
|
|
81
81
|
append_plugin_engine_tailwind_sources(lines)
|
|
@@ -90,7 +90,7 @@ module Avo
|
|
|
90
90
|
|
|
91
91
|
def append_host_tailwind_sources(lines)
|
|
92
92
|
resolved_host_content_source_paths.each do |path|
|
|
93
|
-
lines << %(@source "#{
|
|
93
|
+
lines << %(@source "#{tailwind_path(path)}";)
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
|
|
@@ -110,7 +110,7 @@ module Avo
|
|
|
110
110
|
root = entry[:klass].root
|
|
111
111
|
next unless root&.directory?
|
|
112
112
|
|
|
113
|
-
lines << %(@source "#{
|
|
113
|
+
lines << %(@source "#{tailwind_path(root)}";)
|
|
114
114
|
append_engine_stylesheets(lines, root)
|
|
115
115
|
end
|
|
116
116
|
end
|
|
@@ -121,19 +121,22 @@ module Avo
|
|
|
121
121
|
|
|
122
122
|
# Some engines ship `app/assets/stylesheets/application.css` directly (no namespace folder).
|
|
123
123
|
root_application = stylesheets_root.join("application.css")
|
|
124
|
-
lines << %(@import "#{
|
|
124
|
+
lines << %(@import "#{tailwind_path(root_application)}";) if root_application.exist?
|
|
125
125
|
|
|
126
126
|
# Most engines namespace their assets under `app/assets/stylesheets/<namespace>/application.css`.
|
|
127
127
|
Dir.children(stylesheets_root).sort.each do |entry|
|
|
128
128
|
next if entry.start_with?(".")
|
|
129
129
|
|
|
130
130
|
namespaced_application = stylesheets_root.join(entry, "application.css")
|
|
131
|
-
lines << %(@import "#{
|
|
131
|
+
lines << %(@import "#{tailwind_path(namespaced_application)}";) if namespaced_application.exist?
|
|
132
132
|
end
|
|
133
133
|
end
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
# Always emit absolute paths for @source / @import. Relative paths from tmp/avo are wrong on
|
|
136
|
+
# Capistrano-style deploys: Rails.root may be releases/... while the input file is opened via
|
|
137
|
+
# current/... symlinks, so ".." counts differ and resolvers miss gem trees under shared/bundle.
|
|
138
|
+
def tailwind_path(absolute)
|
|
139
|
+
Pathname.new(absolute).expand_path.to_s.tr("\\", "/")
|
|
137
140
|
end
|
|
138
141
|
|
|
139
142
|
def collect_host_avo_stylesheets
|
|
@@ -144,7 +147,7 @@ module Avo
|
|
|
144
147
|
.glob(base.join("**", "*.css"))
|
|
145
148
|
.select { |path| File.file?(path) }
|
|
146
149
|
.sort
|
|
147
|
-
.map { |path|
|
|
150
|
+
.map { |path| tailwind_path(path) }
|
|
148
151
|
end
|
|
149
152
|
|
|
150
153
|
def run_tailwindcss(*tailwind_args)
|
data/lib/avo/version.rb
CHANGED