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 +4 -4
- data/README.md +39 -12
- data/lib/tailwindcss/formatter/version.rb +1 -1
- data/tailwindcss-formatter.gemspec +6 -3
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b0a52e913a5ea017ecb958467341b07eb9079b113ecc611d0d531a97a786ce2
|
4
|
+
data.tar.gz: 877921beb5246aea9a80c7b3b9fc47c561f86d3dfb8e6280f75e73ed29475e50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b009acc4da9a0b0c6012c992b59a0657670dd26533667eb6d4fe727fe2cda1f219f5cb2be6ac3fdc2eb4fcb89de59cc049edd6a98d99d903cf255d962176ebdf
|
7
|
+
data.tar.gz: 15ebf800ea4c9a97dc49a04c2e360dd342dfe4a1d784bed3adb0ff3944bd420e26e2e2f149e52db057c1024f3eaf55c623b1e6d637a1698a386429a12021f9d2
|
data/README.md
CHANGED
@@ -1,35 +1,62 @@
|
|
1
1
|
# Tailwindcss::Formatter
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
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
|
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
|
18
|
+
gem install tailwindcss-formatter
|
21
19
|
```
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
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`
|
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
|
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
|
61
|
+
Bug reports and pull requests are welcome on GitHub at
|
62
|
+
https://github.com/benbarber/tailwindcss-formatter.
|
@@ -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
|
-
|
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.
|
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:
|
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: []
|