jekyll-tailwindcss 0.4.0 → 0.5.1
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/README.md +10 -1
- data/lib/jekyll/converters/tailwindcss.rb +8 -2
- data/lib/jekyll-tailwindcss/version.rb +1 -1
- data/lib/tailwindcss/commands.rb +3 -3
- metadata +3 -8
- data/lib/tailwindcss/upstream.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78c6146f98c780cb65d3e2c6e77609212130b0b0442602a3fb1ee9218143978e
|
4
|
+
data.tar.gz: 001cd2bfefdc9db3b6519640294064fb19bf93a2b09445cad5757ebeff1f4cf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b98e748ed916539e63ffd33cb6202a51bcb0b4c95abea76c7ebb5415897d7647c4dd097c9e205927a47825af5de5aec9d789b50703f29a92c1e589976589d6b8
|
7
|
+
data.tar.gz: 7f0dc3a01fd94bf14a78fb7fd8ceca7f7f246144cddb438017ba40324ecc49b7a552e8e0d4fbbed645650ed79d8af7d37465002bec69301320b46e3a642b70f4
|
data/README.md
CHANGED
@@ -56,6 +56,15 @@ Any `*.css` file processed by jekyll [^1] that contains the `@tailwind` [directi
|
|
56
56
|
|
57
57
|
[^1]: Jekyll will process any file that begins with yaml [frontmatter](https://jekyllrb.com/docs/front-matter/)
|
58
58
|
|
59
|
+
### Configuration
|
60
|
+
|
61
|
+
Location of the `tailwind.config.js` file can be configured in `_config.yml`:
|
62
|
+
|
63
|
+
``` yaml
|
64
|
+
tailwindcss:
|
65
|
+
config: './tailwind.config.js' # this is the default location
|
66
|
+
```
|
67
|
+
|
59
68
|
### Examples
|
60
69
|
|
61
70
|
|
@@ -117,7 +126,7 @@ gem "jekyll-tailwindcss", path: "/path/to/jekyll-tailwindcss"
|
|
117
126
|
- [ ] commit and create a git tag ( example `git tag -a v0.3.1 -m "Release 0.3.1"` )
|
118
127
|
- push
|
119
128
|
- [ ] `bundle exec rake build`
|
120
|
-
- [ ] `gem push pkg
|
129
|
+
- [ ] `gem push pkg/jekyll-tailwind-[NEW_VERSION].gem
|
121
130
|
- [ ] `git push --follow-tags`
|
122
131
|
- announce
|
123
132
|
- [ ] create a release at https://github.com/vormwald/jekyll-tailwindcss/releases
|
@@ -21,14 +21,16 @@ module Jekyll
|
|
21
21
|
dev_mode = Jekyll.env == "development"
|
22
22
|
Jekyll.logger.info "Jekyll Tailwind:", "Generating #{dev_mode ? "" : "minified "}CSS"
|
23
23
|
|
24
|
-
compile_command = ::Tailwindcss::Commands
|
24
|
+
compile_command = ::Tailwindcss::Commands
|
25
|
+
.compile_command(debug: dev_mode, config: config_location)
|
26
|
+
.join(" ")
|
25
27
|
|
26
28
|
output, error = nil
|
27
29
|
Open3.popen3(tailwindcss_env_options, compile_command) do |stdin, stdout, stderr, _wait_thread|
|
28
30
|
stdin.write content # write the content of *.tailwindcss to the tailwindcss CLI as input
|
29
31
|
stdin.close
|
30
|
-
error = stderr.read
|
31
32
|
output = stdout.read
|
33
|
+
error = stderr.read
|
32
34
|
end
|
33
35
|
Jekyll.logger.warn "Jekyll Tailwind:", error unless error.nil?
|
34
36
|
|
@@ -45,6 +47,10 @@ module Jekyll
|
|
45
47
|
# Since we're using the CLI, we can't update the data, so we ignore it.
|
46
48
|
{"BROWSERSLIST_IGNORE_OLD_DATA" => "1"}
|
47
49
|
end
|
50
|
+
|
51
|
+
def config_location
|
52
|
+
@config.dig("tailwindcss", "config") || "./tailwind.config.js"
|
53
|
+
end
|
48
54
|
end
|
49
55
|
end
|
50
56
|
end
|
data/lib/tailwindcss/commands.rb
CHANGED
@@ -3,12 +3,12 @@ require "tailwindcss/ruby"
|
|
3
3
|
module Tailwindcss
|
4
4
|
module Commands
|
5
5
|
class << self
|
6
|
-
def compile_command(debug: false, **kwargs)
|
6
|
+
def compile_command(debug: false, config: nil, **kwargs)
|
7
7
|
command = [
|
8
8
|
Tailwindcss::Ruby.executable(**kwargs),
|
9
|
-
"--input", "-"
|
10
|
-
"--config", "./tailwind.config.js"
|
9
|
+
"--input", "-"
|
11
10
|
]
|
11
|
+
command += ["--config", config] if config
|
12
12
|
|
13
13
|
command << "--minify" unless debug
|
14
14
|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-tailwindcss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Vormwald
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-07 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: tailwindcss-ruby
|
@@ -24,7 +23,6 @@ dependencies:
|
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: '0'
|
27
|
-
description:
|
28
26
|
email:
|
29
27
|
- mvormwald@gmail.com
|
30
28
|
executables:
|
@@ -40,13 +38,11 @@ files:
|
|
40
38
|
- lib/jekyll-tailwindcss/version.rb
|
41
39
|
- lib/jekyll/converters/tailwindcss.rb
|
42
40
|
- lib/tailwindcss/commands.rb
|
43
|
-
- lib/tailwindcss/upstream.rb
|
44
41
|
homepage: https://github.com/vormwald/jekyll-tailwindcss
|
45
42
|
licenses:
|
46
43
|
- MIT
|
47
44
|
metadata:
|
48
45
|
homepage_uri: https://github.com/vormwald/jekyll-tailwindcss
|
49
|
-
post_install_message:
|
50
46
|
rdoc_options: []
|
51
47
|
require_paths:
|
52
48
|
- lib
|
@@ -61,8 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
57
|
- !ruby/object:Gem::Version
|
62
58
|
version: '0'
|
63
59
|
requirements: []
|
64
|
-
rubygems_version: 3.
|
65
|
-
signing_key:
|
60
|
+
rubygems_version: 3.6.2
|
66
61
|
specification_version: 4
|
67
62
|
summary: Integrate Tailwind CSS into your Jekyll site.
|
68
63
|
test_files: []
|