bridgetown-plugin-tailwindcss 0.1.1 → 0.1.2

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: 9d5e2e373904f9caa02ee47316ab35c76744ebca284ced01dc71b2d7fad4f3cc
4
- data.tar.gz: 4e62c17fa8e0b04aa4408b26f92fbd8218fa41cdf2c7decf62e5e17bac0601f7
3
+ metadata.gz: 02adc20df692a49f8c838710481f8f51ae1769e214a957715330c2a46b4a4f0f
4
+ data.tar.gz: 70e248fd006a26c49f284c11d43b0700019f34b93ac9de72caa2778d6b45972a
5
5
  SHA512:
6
- metadata.gz: 55121446f16f24522967ce1d954f074d12a7d2b10e73a6285965f3439f3310190a2f593716eefe6daf2493d76afd12bca70ab2688f72ca8d48cc4501f0772c01
7
- data.tar.gz: 843ec500c453cc1975a5980c3409c1530ecd38781ada5f3d71cbb330759aab32bffb393a50a8e616fda5c3b9c2ab5122125cf22318ce924e1e572d8576f40d63
6
+ metadata.gz: 8c9133b819b886276eb8542ebd734fd4dc99f02a51e991ea348be7c51baf02cf95ffdb34ecfca77da7d715aa5f289b6692e6815e3556236603da15b46ce78b2d
7
+ data.tar.gz: b32326cad89045140db9a2bd0510ad25f13284f1cd9ed0d46f30c7690777ad990e1e9150da04f202b08c08b9dfff7e70f058ce018292d2033c1c9554be9e8535
data/Rakefile CHANGED
@@ -13,6 +13,10 @@ task :release do
13
13
  Rake.sh "./script/release"
14
14
  end
15
15
 
16
+ task :format do
17
+ Rake.sh "./script/fmt -a"
18
+ end
19
+
16
20
 
17
21
  namespace :bump do
18
22
  task :current do
@@ -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 = "Bridgetown Team"
9
- spec.email = "maintainers@bridgetownrb.com"
10
- spec.summary = "Sample code for creating new Bridgetown plugins"
11
- spec.homepage = "https://github.com/bridgetownrb/bridgetown-plugin-tailwindcss"
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 'bridgetown-plugin-tailwindcss/command.rb'
5
- require 'bridgetown-plugin-tailwindcss/utils.rb'
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
- require 'bridgetown'
2
- require_relative 'utils'
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 'Initialize config for Tailwind'
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 |args, options|
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
- require 'thor'
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 = /(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/
15
+ VERSION_REGEX = %r!(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)!.freeze
14
16
 
15
- no_commands {
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
- [ @package_json, @version_file ]
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
- raise "\nYou gave #{type} but the only accepted types are
58
- #{groups.keys}" unless groups.keys.include?(type)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TailwindCss
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bridgetown-plugin-tailwindcss",
3
- "version": "0.1.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.1",
18
- "postcss-loader": "^0.1.1",
19
- "tailwindcss": "^0.1.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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
- - Bridgetown Team
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: maintainers@bridgetownrb.com
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/bridgetownrb/bridgetown-plugin-tailwindcss
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.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: Sample code for creating new Bridgetown plugins
162
+ summary: A plugin to add tailwindcss to a site
163
163
  test_files: []