bridgetown-plugin-tailwindcss 0.1.5 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bridgetown-plugin-tailwindcss/utils.rb +29 -12
- data/lib/bridgetown-plugin-tailwindcss/version.rb +1 -1
- data/package.json +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6907ae8359a1375066abb794044ba83dacd561ddfd981200134e9958b02e36dc
|
4
|
+
data.tar.gz: d6a1ba20c529991a1c8778b54c3de218dc6710f69070066b7a8a8ccb38e17851
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cbc34000352ca5d2e28d5357ab44cde6c6f3d4971df7d7e9947272a45b955a516b720f5a05df82ea97e3dd8cecc2d615b4fccef37f7e30aa99f3246a77becf2
|
7
|
+
data.tar.gz: ccbd01c59e859158372c934a08024934f4943e154824bcc3a6f4b4739804d42f25c4bf6a59057e23b3e872578a74a6dee40c9d596e747fd997bb3106043e2cba
|
@@ -12,7 +12,11 @@ module TailwindCss
|
|
12
12
|
class Bump < Thor
|
13
13
|
include Thor::Actions
|
14
14
|
|
15
|
+
RUBY_VERSION_REGEX = %r!(.*VERSION.?=.*)!.freeze
|
16
|
+
NPM_VERSION_REGEX = %r!(.*"version":.*)!.freeze
|
17
|
+
VERSION_LINE = Regexp.union(RUBY_VERSION_REGEX, NPM_VERSION_REGEX)
|
15
18
|
VERSION_REGEX = %r!(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)!.freeze
|
19
|
+
GSUB_REGEX = %r!(?<version>#{VERSION_LINE})#{VERSION_REGEX}!.freeze
|
16
20
|
|
17
21
|
# rubocop:disable Metrics/BlockLength
|
18
22
|
no_commands do
|
@@ -23,30 +27,43 @@ module TailwindCss
|
|
23
27
|
def bump_version_to_string(string)
|
24
28
|
say("Bumping from #{VERSION} to #{string}", :red)
|
25
29
|
|
30
|
+
match = GSUB_REGEX.match(File.read(file))
|
31
|
+
gsub_string = "#{match[:version]}#{string}"
|
26
32
|
version_files.each do |file|
|
27
|
-
gsub_file(file,
|
33
|
+
gsub_file(file, GSUB_REGEX, gsub_string)
|
28
34
|
end
|
29
35
|
end
|
30
36
|
|
31
|
-
def bump_version(type, version: VERSION
|
32
|
-
say(version_change(type, version: version
|
37
|
+
def bump_version(type, version: VERSION)
|
38
|
+
say(version_change(type, version: version), :red)
|
33
39
|
|
34
40
|
version_files.each do |file|
|
35
|
-
|
36
|
-
|
41
|
+
match = GSUB_REGEX.match(File.read(file))
|
42
|
+
gsub_string = "#{match[:version]}#{to_version(type, version: version)}"
|
43
|
+
|
44
|
+
gsub_file(file, GSUB_REGEX,
|
45
|
+
gsub_string)
|
37
46
|
end
|
38
47
|
end
|
39
48
|
|
40
49
|
private
|
41
50
|
|
51
|
+
def gsub_match(file)
|
52
|
+
GSUB_REGEX.match(File.read(file))
|
53
|
+
end
|
54
|
+
|
42
55
|
def version_files
|
43
|
-
|
44
|
-
|
56
|
+
package_json = File.expand_path("package.json")
|
57
|
+
version_file = File.expand_path(File.join(__dir__, "version.rb"))
|
45
58
|
|
46
|
-
[
|
59
|
+
[package_json, version_file]
|
47
60
|
end
|
48
61
|
|
49
|
-
|
62
|
+
# ef version_replacement
|
63
|
+
# match = GSUB_REGEX.match(File.readlines
|
64
|
+
# end
|
65
|
+
|
66
|
+
def to_version(type, version: nil)
|
50
67
|
from = version
|
51
68
|
match = VERSION_REGEX.match(from)
|
52
69
|
|
@@ -61,7 +78,7 @@ module TailwindCss
|
|
61
78
|
#{groups.keys}"
|
62
79
|
end
|
63
80
|
|
64
|
-
groups[type] =
|
81
|
+
groups[type] = (groups[type].to_i + 1).to_s
|
65
82
|
|
66
83
|
bump_to_zero(type, groups)
|
67
84
|
|
@@ -78,8 +95,8 @@ module TailwindCss
|
|
78
95
|
groups[:minor] = "0"
|
79
96
|
end
|
80
97
|
|
81
|
-
def version_change(type, version: nil
|
82
|
-
"Bumping from #{version} to #{to_version(type, version: version
|
98
|
+
def version_change(type, version: nil)
|
99
|
+
"Bumping from #{version} to #{to_version(type, version: version)}"
|
83
100
|
end
|
84
101
|
end
|
85
102
|
# rubocop:enable Metrics/BlockLength
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "bridgetown-plugin-tailwindcss",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.12",
|
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
|
"dependencies": {
|
17
|
-
"postcss-import": "^0.1
|
18
|
-
"postcss-loader": "^0.
|
19
|
-
"tailwindcss": "^
|
17
|
+
"postcss-import": "^12.0.1",
|
18
|
+
"postcss-loader": "^3.0.0",
|
19
|
+
"tailwindcss": "^1.4.6"
|
20
20
|
}
|
21
21
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konnor Rogers
|
@@ -140,7 +140,7 @@ 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.12
|
144
144
|
post_install_message:
|
145
145
|
rdoc_options: []
|
146
146
|
require_paths:
|