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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee5b0b99b5a652053bd30aa564181ff1d80e620ee224d2bafcf494bd55d6c891
4
- data.tar.gz: 827baa288658e2d5ff141fad55b4325ac8ae8b176feb8ce5fd7de5b68793b4b0
3
+ metadata.gz: ef76f37afeb8183be5169a62f202a8082ed9eef254165dd5deafe69938c98a8c
4
+ data.tar.gz: fd691f852943aa5a25e0f610b4bdd09c2292521bf17abb2c88d2fe05e97b9179
5
5
  SHA512:
6
- metadata.gz: b98372d3ead957a4dd5da63259868f8557d96a31200e92ae3f0a0c2ad862e9f00f57d4be784df5f649bbedb03cc493ff3394a44321a37272e26627c13a1a0773
7
- data.tar.gz: f867b88d892c3412547d8c24eaa6b819f1735c828c15f950e01cd4ede39526b2a6b42b39b54d1c7af3953414af13b2022a4b4881dca7fba5d4cffde6b542c687
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
- puts("#{file}:#{line_number}:CSS classes are not sorted well. Please run 'tailwind_sorter #{file}'.")
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
 
@@ -1,3 +1,3 @@
1
1
  module TailwindSorter
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
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.0
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-17 00:00:00.000000000 Z
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: