tailwind-sorter 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tailwind_sorter/sorter.rb +6 -1
- data/lib/tailwind_sorter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef76f37afeb8183be5169a62f202a8082ed9eef254165dd5deafe69938c98a8c
|
4
|
+
data.tar.gz: fd691f852943aa5a25e0f610b4bdd09c2292521bf17abb2c88d2fe05e97b9179
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39bf625392ad648e2d7d6ca313d7c76b80ee5d930eff7cdc5582d0d65d4da7ac2932f4b94010077b19c0f1d93cdc7ce5e06e1830b19fe935ecd6a98b88dd8a76
|
7
|
+
data.tar.gz: 1c60d0526b8afe14a14abf6de9a57948e350cc742cc1fda88b2c82068014f65860e9c98a046655d14f333b28d181feeeff9275858354c02484a2df2b3a9755ea
|
@@ -34,6 +34,7 @@ module TailwindSorter
|
|
34
34
|
def sort_classes(file, regexps:, variants_order:, classes_order:, default_index: 0, warn_only: false)
|
35
35
|
class_groups = classes_order.keys
|
36
36
|
sort_order = classes_order.values.flatten
|
37
|
+
warnings = []
|
37
38
|
|
38
39
|
infile = File.open(file)
|
39
40
|
outfile = Tempfile.create("#{File.basename(file)}.sorted")
|
@@ -69,7 +70,9 @@ module TailwindSorter
|
|
69
70
|
# puts orig_keys.inspect
|
70
71
|
# puts sorted_keys.inspect
|
71
72
|
if orig_keys != sorted_keys
|
72
|
-
|
73
|
+
warning = "#{file}:#{line_number}:CSS classes are not sorted well. Please run 'tailwind_sorter #{file}'."
|
74
|
+
warnings << warning
|
75
|
+
puts(warning)
|
73
76
|
end
|
74
77
|
else
|
75
78
|
orig_line = line.dup unless changed
|
@@ -83,6 +86,8 @@ module TailwindSorter
|
|
83
86
|
|
84
87
|
success = true
|
85
88
|
|
89
|
+
warnings
|
90
|
+
|
86
91
|
rescue StandardError
|
87
92
|
success = false
|
88
93
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tailwind-sorter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NejŘemeslníci.cz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Simple but customizable sorter for TailwindCSS classes
|
14
14
|
email:
|