bridgetown-plugin-tailwindcss 0.1.1 → 0.1.2
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/Rakefile +4 -0
- data/bridgetown-plugin-tailwindcss.gemspec +4 -4
- data/lib/bridgetown-plugin-tailwindcss.rb +3 -3
- data/lib/bridgetown-plugin-tailwindcss/command.rb +6 -6
- data/lib/bridgetown-plugin-tailwindcss/utils.rb +14 -9
- data/lib/bridgetown-plugin-tailwindcss/version.rb +1 -1
- data/package.json +4 -4
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 02adc20df692a49f8c838710481f8f51ae1769e214a957715330c2a46b4a4f0f
|
|
4
|
+
data.tar.gz: 70e248fd006a26c49f284c11d43b0700019f34b93ac9de72caa2778d6b45972a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c9133b819b886276eb8542ebd734fd4dc99f02a51e991ea348be7c51baf02cf95ffdb34ecfca77da7d715aa5f289b6692e6815e3556236603da15b46ce78b2d
|
|
7
|
+
data.tar.gz: b32326cad89045140db9a2bd0510ad25f13284f1cd9ed0d46f30c7690777ad990e1e9150da04f202b08c08b9dfff7e70f058ce018292d2033c1c9554be9e8535
|
data/Rakefile
CHANGED
|
@@ -5,10 +5,10 @@ require_relative "lib/bridgetown-plugin-tailwindcss/version"
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "bridgetown-plugin-tailwindcss"
|
|
7
7
|
spec.version = TailwindCss::VERSION
|
|
8
|
-
spec.author = "
|
|
9
|
-
spec.email = "
|
|
10
|
-
spec.summary = "
|
|
11
|
-
spec.homepage = "https://github.com/
|
|
8
|
+
spec.author = "Konnor Rogers"
|
|
9
|
+
spec.email = "konnor7414@gmail.com"
|
|
10
|
+
spec.summary = "A plugin to add tailwindcss to a site"
|
|
11
|
+
spec.homepage = "https://github.com/paramagicdev/bridgetown-plugin-tailwindcss"
|
|
12
12
|
spec.license = "MIT"
|
|
13
13
|
|
|
14
14
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features|frontend)/!) }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "bridgetown"
|
|
4
|
-
require
|
|
5
|
-
require
|
|
4
|
+
require "bridgetown-plugin-tailwindcss/command.rb"
|
|
5
|
+
require "bridgetown-plugin-tailwindcss/utils.rb"
|
|
6
6
|
|
|
7
7
|
Bridgetown::PluginManager.new_source_manifest(
|
|
8
|
-
origin: TailwindCss
|
|
8
|
+
origin: TailwindCss
|
|
9
9
|
)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "bridgetown"
|
|
4
|
+
require_relative "utils"
|
|
3
5
|
|
|
4
6
|
class TailwindInit < Bridgetown::Command
|
|
5
7
|
ACTIONS = TailwindCss::Utils::Actions.new
|
|
@@ -8,10 +10,10 @@ class TailwindInit < Bridgetown::Command
|
|
|
8
10
|
def init_with_program(prog)
|
|
9
11
|
prog.command(:tailwind_init) do |c|
|
|
10
12
|
c.syntax "tailwind_init"
|
|
11
|
-
c.description
|
|
13
|
+
c.description "Initialize config for Tailwind"
|
|
12
14
|
# c.option 'path', '--path', 'Choose the path to install tailwind'
|
|
13
15
|
|
|
14
|
-
c.action do |
|
|
16
|
+
c.action do |_args, _options|
|
|
15
17
|
Bridgetown::Commands::TailwindInit.new.run
|
|
16
18
|
end
|
|
17
19
|
end
|
|
@@ -23,7 +25,6 @@ class TailwindInit < Bridgetown::Command
|
|
|
23
25
|
write_files
|
|
24
26
|
end
|
|
25
27
|
|
|
26
|
-
|
|
27
28
|
def write_files
|
|
28
29
|
webpack_config = File.expand_path("webpack.config.js")
|
|
29
30
|
tailwind_config = File.expand_path("tailwind.config.js")
|
|
@@ -101,4 +102,3 @@ class TailwindInit < Bridgetown::Command
|
|
|
101
102
|
end
|
|
102
103
|
end
|
|
103
104
|
end
|
|
104
|
-
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "thor"
|
|
2
4
|
|
|
3
5
|
module TailwindCss
|
|
4
6
|
module Utils
|
|
@@ -10,9 +12,10 @@ module TailwindCss
|
|
|
10
12
|
class Bump < Thor
|
|
11
13
|
include Thor::Actions
|
|
12
14
|
|
|
13
|
-
VERSION_REGEX =
|
|
15
|
+
VERSION_REGEX = %r!(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)!.freeze
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
# rubocop:disable Metrics/BlockLength
|
|
18
|
+
no_commands do
|
|
16
19
|
def current_version
|
|
17
20
|
VERSION
|
|
18
21
|
end
|
|
@@ -28,7 +31,6 @@ module TailwindCss
|
|
|
28
31
|
def bump_version(type, version: VERSION, value: nil)
|
|
29
32
|
say(version_change(type, version: version, value: value), :red)
|
|
30
33
|
|
|
31
|
-
|
|
32
34
|
version_files.each do |file|
|
|
33
35
|
gsub_file(file, VERSION_REGEX,
|
|
34
36
|
to_version(type, version: version, value: value))
|
|
@@ -41,7 +43,7 @@ module TailwindCss
|
|
|
41
43
|
@package_json = File.expand_path("package.json")
|
|
42
44
|
@version_file = File.expand_path(File.join(__dir__, "version.rb"))
|
|
43
45
|
|
|
44
|
-
[
|
|
46
|
+
[@package_json, @version_file]
|
|
45
47
|
end
|
|
46
48
|
|
|
47
49
|
def to_version(type, version: nil, value: nil)
|
|
@@ -51,11 +53,13 @@ module TailwindCss
|
|
|
51
53
|
groups = {
|
|
52
54
|
major: match[:major],
|
|
53
55
|
minor: match[:minor],
|
|
54
|
-
patch: match[:patch]
|
|
56
|
+
patch: match[:patch],
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
unless groups.key?(type)
|
|
60
|
+
raise "\nYou gave #{type} but the only accepted types are
|
|
61
|
+
#{groups.keys}"
|
|
62
|
+
end
|
|
59
63
|
|
|
60
64
|
groups[type] = value || (groups[type].to_i + 1).to_s
|
|
61
65
|
|
|
@@ -77,7 +81,8 @@ module TailwindCss
|
|
|
77
81
|
def version_change(type, version: nil, value: nil)
|
|
78
82
|
"Bumping from #{version} to #{to_version(type, version: version, value: value)}"
|
|
79
83
|
end
|
|
80
|
-
|
|
84
|
+
end
|
|
85
|
+
# rubocop:enable Metrics/BlockLength
|
|
81
86
|
end
|
|
82
87
|
end
|
|
83
88
|
end
|
data/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bridgetown-plugin-tailwindcss",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"main": "frontend/javascript/index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"frontend"
|
|
15
15
|
],
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"postcss-import": "^0.1.
|
|
18
|
-
"postcss-loader": "^0.1.
|
|
19
|
-
"tailwindcss": "^0.1.
|
|
17
|
+
"postcss-import": "^0.1.2",
|
|
18
|
+
"postcss-loader": "^0.1.2",
|
|
19
|
+
"tailwindcss": "^0.1.2"
|
|
20
20
|
}
|
|
21
21
|
}
|
metadata
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bridgetown-plugin-tailwindcss
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- Konnor Rogers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
@@ -115,7 +115,7 @@ dependencies:
|
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
116
|
version: '0.2'
|
|
117
117
|
description:
|
|
118
|
-
email:
|
|
118
|
+
email: konnor7414@gmail.com
|
|
119
119
|
executables: []
|
|
120
120
|
extensions: []
|
|
121
121
|
extra_rdoc_files: []
|
|
@@ -136,11 +136,11 @@ files:
|
|
|
136
136
|
- package.json
|
|
137
137
|
- tags
|
|
138
138
|
- yarn.lock
|
|
139
|
-
homepage: https://github.com/
|
|
139
|
+
homepage: https://github.com/paramagicdev/bridgetown-plugin-tailwindcss
|
|
140
140
|
licenses:
|
|
141
141
|
- MIT
|
|
142
142
|
metadata:
|
|
143
|
-
yarn-add: bridgetown-plugin-tailwindcss@0.1.
|
|
143
|
+
yarn-add: bridgetown-plugin-tailwindcss@0.1.2
|
|
144
144
|
post_install_message:
|
|
145
145
|
rdoc_options: []
|
|
146
146
|
require_paths:
|
|
@@ -159,5 +159,5 @@ requirements: []
|
|
|
159
159
|
rubygems_version: 3.0.3
|
|
160
160
|
signing_key:
|
|
161
161
|
specification_version: 4
|
|
162
|
-
summary:
|
|
162
|
+
summary: A plugin to add tailwindcss to a site
|
|
163
163
|
test_files: []
|