tailwindcss-formatter 0.1.0 → 0.1.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: b19aef1c5b1d66878b4958539acd3bdbbb750b6aa88ca7badedcb951003483a6
4
- data.tar.gz: 91497c6398ec7faef985b192c36912425faa135c155f511f42f4c49410a33dc5
3
+ metadata.gz: 8b0a52e913a5ea017ecb958467341b07eb9079b113ecc611d0d531a97a786ce2
4
+ data.tar.gz: 877921beb5246aea9a80c7b3b9fc47c561f86d3dfb8e6280f75e73ed29475e50
5
5
  SHA512:
6
- metadata.gz: 84bd6491ab8ad09dc25fab0c7eb97c30799d3d7fe90fa94cb7ffa132d9bc930be3a9c7c195dc6f8d927b6ab6951f099a6ffa99519c31109374307e551b8590c4
7
- data.tar.gz: 538d2bc1081fb42109afcbdef1551d9d3a261fe53b219c2eb262db9dc4530534f79962a59c87263e5aba809ce11c981bd41c326f68548d00e13260572362297b
6
+ metadata.gz: b009acc4da9a0b0c6012c992b59a0657670dd26533667eb6d4fe727fe2cda1f219f5cb2be6ac3fdc2eb4fcb89de59cc049edd6a98d99d903cf255d962176ebdf
7
+ data.tar.gz: 15ebf800ea4c9a97dc49a04c2e360dd342dfe4a1d784bed3adb0ff3944bd420e26e2e2f149e52db057c1024f3eaf55c623b1e6d637a1698a386429a12021f9d2
data/README.md CHANGED
@@ -1,35 +1,62 @@
1
1
  # Tailwindcss::Formatter
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tailwindcss/formatter`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ This Ruby Gem provides a CLI interface for effortlessly organising and formating Tailwind
4
+ CSS class declarations in your HTML and ERB templates, following the recommended class
5
+ order for cleaner and more maintainable code.
6
6
 
7
7
  ## Installation
8
8
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
- Install the gem and add to the application's Gemfile by executing:
9
+ Install the gem and add it to the application's Gemfile by executing:
12
10
 
13
11
  ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
12
+ bundle add tailwindcss-formatter
15
13
  ```
16
14
 
17
15
  If bundler is not being used to manage dependencies, install the gem by executing:
18
16
 
19
17
  ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
18
+ gem install tailwindcss-formatter
21
19
  ```
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ Once installed, you can run the formatter from the CLI to format your files. It runs
24
+ in dry mode by default, so you will need to specify the `-w | --write` flag to have the
25
+ modifications written back to the files in place.
26
+
27
+ It takes a glob or file path as the first argument. If you leave this empty, it will
28
+ use the default, which is set up for a typical Rails project: `"app/**/*.html.erb"`.
29
+
30
+ Example with glob pattern to match files:
31
+
32
+ ```bash
33
+ tailwindcss-format "app/**/*.html.erb"
34
+ ```
35
+
36
+ Example passing the `--write` flag so the formatting is written to the files in place:
37
+
38
+ ```bash
39
+ tailwindcss-format "app/**/*.html.erb" -w
40
+ ```
41
+
42
+ ### Flags
43
+
44
+ `-w | --write` Writes the formatted class strings back to the file in place.
45
+
46
+ `-c | --check-formatted` Raises exit code 1 if unformatted class declarations are detected.
26
47
 
27
48
  ## Development
28
49
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
50
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec`
51
+ to run the tests. You can also run `bin/console` for an interactive prompt that will allow
52
+ you to experiment.
30
53
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
54
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a
55
+ new version, update the version number in `version.rb`, and then run `bundle exec rake release`,
56
+ which will create a git tag for the version, push git commits and the created tag, and push
57
+ the `.gem` file to [rubygems.org](https://rubygems.org).
32
58
 
33
59
  ## Contributing
34
60
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tailwindcss-formatter.
61
+ Bug reports and pull requests are welcome on GitHub at
62
+ https://github.com/benbarber/tailwindcss-formatter.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tailwindcss
4
4
  module Formatter
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
@@ -5,12 +5,15 @@ require_relative "lib/tailwindcss/formatter/version"
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "tailwindcss-formatter"
7
7
  spec.version = Tailwindcss::Formatter::VERSION
8
+ spec.required_ruby_version = ">= 3.0.0"
9
+ spec.licenses = %w(MIT)
10
+
8
11
  spec.authors = ["Ben Barber"]
9
12
  spec.email = ["contact@benbarber.co.uk"]
10
-
11
- spec.summary = "Format and sort Tailwind CSS classes based on the recommended class order."
12
13
  spec.homepage = "https://github.com/benbarber/tailwindcss-formatter#readme"
13
- spec.required_ruby_version = ">= 3.0.0"
14
+
15
+ spec.summary = "Effortlessly organize and format Tailwind CSS class declarations in your HTML and ERB
16
+ templates, following the recommended class order for cleaner and more maintainable code."
14
17
 
15
18
  spec.metadata["homepage_uri"] = spec.homepage
16
19
  spec.metadata["source_code_uri"] = "https://github.com/benbarber/tailwindcss-formatter"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwindcss-formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Barber
@@ -26,7 +26,8 @@ files:
26
26
  - lib/tailwindcss/formatter/version.rb
27
27
  - tailwindcss-formatter.gemspec
28
28
  homepage: https://github.com/benbarber/tailwindcss-formatter#readme
29
- licenses: []
29
+ licenses:
30
+ - MIT
30
31
  metadata:
31
32
  homepage_uri: https://github.com/benbarber/tailwindcss-formatter#readme
32
33
  source_code_uri: https://github.com/benbarber/tailwindcss-formatter
@@ -50,5 +51,7 @@ requirements: []
50
51
  rubygems_version: 3.5.21
51
52
  signing_key:
52
53
  specification_version: 4
53
- summary: Format and sort Tailwind CSS classes based on the recommended class order.
54
+ summary: Effortlessly organize and format Tailwind CSS class declarations in your
55
+ HTML and ERB templates, following the recommended class order for cleaner and more
56
+ maintainable code.
54
57
  test_files: []