phlex-icons-flag 0.16.0 ā 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/generators/bootstrap.rb +7 -1
- data/generators/flag.rb +7 -1
- data/generators/helper.rb +6 -0
- data/generators/hero.rb +7 -1
- data/generators/lucide.rb +10 -1
- data/generators/radix.rb +8 -2
- data/generators/remix.rb +7 -1
- data/generators/tabler.rb +7 -1
- data/lib/phlex/icons/flag.rb +2 -0
- data/lib/phlex/icons/version.rb +1 -1
- 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: 1a2a751bf5deba63c5ac7c606ea72c35df7770b6eec33bf71188c6909d2339db
|
4
|
+
data.tar.gz: 64c14945516466fb3face4d5da3223d47ba677e430eb4d7bcffe31303616789d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a467c4f2f7d4ebd3ce7fa49bfea671c4112f10a8374f588a0ac5db8e7f242c0ccbf2f89ca03dd05024eda19aa53828c85ab50fa9c879ada69fdd6d38a3750de7
|
7
|
+
data.tar.gz: 65876cd83fc701d0e4570bede958fc3ce076a6e17ee1080065c379e5932681c96f538d79d2342f1c139cd88079b7300077efe2e4acb80e7e16b7c4d32c26d8fc
|
data/README.md
CHANGED
@@ -124,7 +124,7 @@ Phlex::Icons::Tabler.configuration.default_variant = :outline # or :filled
|
|
124
124
|
### With `Phlex::Kit`
|
125
125
|
|
126
126
|
```ruby
|
127
|
-
require 'phlex-icons'
|
127
|
+
require 'phlex-icons' # No need to require the gem if you are using it in a Rails application.
|
128
128
|
|
129
129
|
class PhlexIcons < Phlex::HTML
|
130
130
|
include Phlex::Icons
|
@@ -146,7 +146,7 @@ end
|
|
146
146
|
### Without `Phlex::Kit`
|
147
147
|
|
148
148
|
```ruby
|
149
|
-
require 'phlex-icons'
|
149
|
+
require 'phlex-icons' # No need to require the gem if you are using it in a Rails application.
|
150
150
|
|
151
151
|
class PhlexIcons < Phlex::HTML
|
152
152
|
def view_template
|
@@ -172,8 +172,8 @@ Let's say you want to use only Heroicons and Flag Icons, you can use the followi
|
|
172
172
|
Then, in your application, you can use the icons like this:
|
173
173
|
|
174
174
|
```ruby
|
175
|
-
require 'phlex-icons-flag'
|
176
|
-
require 'phlex-icons-hero'
|
175
|
+
require 'phlex-icons-flag' # No need to require the gem if you are using it in a Rails application.
|
176
|
+
require 'phlex-icons-hero' # No need to require the gem if you are using it in a Rails application.
|
177
177
|
|
178
178
|
class PhlexIcons < Phlex::HTML
|
179
179
|
include Phlex::Icons # If you want to use Phlex::Kit.
|
@@ -230,7 +230,7 @@ Now, you can use your custom icons like any other icon pack as described above.
|
|
230
230
|
|
231
231
|
## Update icon packs
|
232
232
|
|
233
|
-
All icon packs provided in this gem are auto-generated by their generator under [`generators`](/generators) directory. You just need to clone the repo and run the generator for the icon pack you want to update.
|
233
|
+
All icon packs provided in this gem are auto-generated by their generator under [`generators`](/generators) directory. You just need to clone the repo and run the generator for the icon pack you want to update. Also, there is a GitHub Action that will run the generator for all icon packs and update the gem weekly on each Friday.
|
234
234
|
|
235
235
|
## Development
|
236
236
|
|
data/generators/bootstrap.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
|
|
4
4
|
|
5
5
|
REPO_URL = 'https://github.com/twbs/icons.git'
|
6
6
|
REPO_NAME = 'twbs-icons'
|
7
|
+
ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/bootstrap.rb'
|
7
8
|
ICONS_PACK_PATH = 'lib/phlex/icons/bootstrap'
|
8
9
|
|
9
10
|
TEMPLATE = ERB.new <<~TEMPLATE
|
@@ -39,7 +40,12 @@ REPLACEMENTS = {
|
|
39
40
|
}.freeze
|
40
41
|
|
41
42
|
def main
|
42
|
-
run_generator
|
43
|
+
run_generator do
|
44
|
+
new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
|
45
|
+
update_icon_path_version(new_version)
|
46
|
+
|
47
|
+
icon_file_paths.tqdm.each { create_icon_component(_1) }
|
48
|
+
end
|
43
49
|
end
|
44
50
|
|
45
51
|
def icon_file_paths
|
data/generators/flag.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
|
|
4
4
|
|
5
5
|
REPO_URL = 'https://github.com/lipis/flag-icons.git'
|
6
6
|
REPO_NAME = 'lipis-flag-icons'
|
7
|
+
ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/flag.rb'
|
7
8
|
ICONS_PACK_PATH = 'lib/phlex/icons/flag'
|
8
9
|
|
9
10
|
TEMPLATE = ERB.new <<~TEMPLATE
|
@@ -29,7 +30,12 @@ TEMPLATE = ERB.new <<~TEMPLATE
|
|
29
30
|
TEMPLATE
|
30
31
|
|
31
32
|
def main
|
32
|
-
run_generator
|
33
|
+
run_generator do
|
34
|
+
new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
|
35
|
+
update_icon_path_version(new_version)
|
36
|
+
|
37
|
+
icon_file_names.tqdm.each { create_icon_component(_1) }
|
38
|
+
end
|
33
39
|
end
|
34
40
|
|
35
41
|
def icon_file_names
|
data/generators/helper.rb
CHANGED
@@ -55,6 +55,12 @@ def prepare_phlex_icons_pack_directory(icons_pack_path)
|
|
55
55
|
puts "\e[2K\rš '#{icons_pack_path}' directory prepared successfully!"
|
56
56
|
end
|
57
57
|
|
58
|
+
def update_icon_path_version(new_version)
|
59
|
+
content = File.read(ICONS_PACK_MODULE_PATH)
|
60
|
+
updated_content = content.sub(/VERSION = '.*'/, "VERSION = '#{new_version}'")
|
61
|
+
File.write(ICONS_PACK_MODULE_PATH, updated_content)
|
62
|
+
end
|
63
|
+
|
58
64
|
def component_file_name(icon_file_name, replacements = nil)
|
59
65
|
replacements ||= {}
|
60
66
|
|
data/generators/hero.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
|
|
4
4
|
|
5
5
|
REPO_URL = 'https://github.com/tailwindlabs/heroicons.git'
|
6
6
|
REPO_NAME = 'tailwindlabs-heroicons'
|
7
|
+
ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/hero.rb'
|
7
8
|
ICONS_PACK_PATH = 'lib/phlex/icons/hero'
|
8
9
|
|
9
10
|
TEMPLATE = ERB.new <<~TEMPLATE
|
@@ -29,7 +30,12 @@ TEMPLATE = ERB.new <<~TEMPLATE
|
|
29
30
|
TEMPLATE
|
30
31
|
|
31
32
|
def main
|
32
|
-
run_generator
|
33
|
+
run_generator do
|
34
|
+
new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
|
35
|
+
update_icon_path_version(new_version)
|
36
|
+
|
37
|
+
icon_file_names.tqdm.each { create_icon_component(_1) }
|
38
|
+
end
|
33
39
|
end
|
34
40
|
|
35
41
|
def icon_file_names
|
data/generators/lucide.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
|
|
4
4
|
|
5
5
|
REPO_URL = 'https://github.com/lucide-icons/lucide.git'
|
6
6
|
REPO_NAME = 'lucide-icons-lucide'
|
7
|
+
ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/lucide.rb'
|
7
8
|
ICONS_PACK_PATH = 'lib/phlex/icons/lucide'
|
8
9
|
|
9
10
|
TEMPLATE = ERB.new <<~TEMPLATE
|
@@ -25,7 +26,15 @@ TEMPLATE = ERB.new <<~TEMPLATE
|
|
25
26
|
TEMPLATE
|
26
27
|
|
27
28
|
def main
|
28
|
-
run_generator
|
29
|
+
run_generator do
|
30
|
+
cd_command = "cd generators/#{REPO_NAME}"
|
31
|
+
safe_directory_command = "git config --global --add safe.directory '*'"
|
32
|
+
get_latest_tag_command = 'git describe --tags --abbrev=0'
|
33
|
+
new_version = `#{cd_command} && #{safe_directory_command} && #{get_latest_tag_command}`.strip
|
34
|
+
update_icon_path_version(new_version)
|
35
|
+
|
36
|
+
icon_file_paths.tqdm.each { create_icon_component(_1) }
|
37
|
+
end
|
29
38
|
end
|
30
39
|
|
31
40
|
def icon_file_paths
|
data/generators/radix.rb
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
|
3
3
|
require_relative 'helper'
|
4
4
|
|
5
|
-
REPO_URL = 'https://github.com/radix-ui/icons'
|
5
|
+
REPO_URL = 'https://github.com/radix-ui/icons.git'
|
6
6
|
REPO_NAME = 'radix-ui-icons'
|
7
|
+
ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/radix.rb'
|
7
8
|
ICONS_PACK_PATH = 'lib/phlex/icons/radix'
|
8
9
|
|
9
10
|
TEMPLATE = ERB.new <<~TEMPLATE
|
@@ -25,7 +26,12 @@ TEMPLATE = ERB.new <<~TEMPLATE
|
|
25
26
|
TEMPLATE
|
26
27
|
|
27
28
|
def main
|
28
|
-
run_generator
|
29
|
+
run_generator do
|
30
|
+
new_version = JSON.parse(File.read("generators/#{REPO_NAME}/packages/radix-icons/package.json"))['version']
|
31
|
+
update_icon_path_version(new_version)
|
32
|
+
|
33
|
+
icon_file_paths.tqdm.each { create_icon_component(_1) }
|
34
|
+
end
|
29
35
|
end
|
30
36
|
|
31
37
|
def icon_file_paths
|
data/generators/remix.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
|
|
4
4
|
|
5
5
|
REPO_URL = 'https://github.com/Remix-Design/RemixIcon.git'
|
6
6
|
REPO_NAME = 'remix-design-remixicon'
|
7
|
+
ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/remix.rb'
|
7
8
|
ICONS_PACK_PATH = 'lib/phlex/icons/remix'
|
8
9
|
|
9
10
|
TEMPLATE = ERB.new <<~TEMPLATE
|
@@ -30,7 +31,12 @@ REPLACEMENTS = {
|
|
30
31
|
}.freeze
|
31
32
|
|
32
33
|
def main
|
33
|
-
run_generator
|
34
|
+
run_generator do
|
35
|
+
new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
|
36
|
+
update_icon_path_version(new_version)
|
37
|
+
|
38
|
+
icon_file_paths.tqdm.each { create_icon_component(_1) }
|
39
|
+
end
|
34
40
|
end
|
35
41
|
|
36
42
|
def icon_file_paths
|
data/generators/tabler.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
|
|
4
4
|
|
5
5
|
REPO_URL = 'https://github.com/tabler/tabler-icons.git'
|
6
6
|
REPO_NAME = 'tabler-tabler-icons'
|
7
|
+
ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/tabler.rb'
|
7
8
|
ICONS_PACK_PATH = 'lib/phlex/icons/tabler'
|
8
9
|
|
9
10
|
TEMPLATE = ERB.new <<~TEMPLATE
|
@@ -29,7 +30,12 @@ TEMPLATE = ERB.new <<~TEMPLATE
|
|
29
30
|
TEMPLATE
|
30
31
|
|
31
32
|
def main
|
32
|
-
run_generator
|
33
|
+
run_generator do
|
34
|
+
new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
|
35
|
+
update_icon_path_version(new_version)
|
36
|
+
|
37
|
+
icon_file_names.tqdm.each { create_icon_component(_1) }
|
38
|
+
end
|
33
39
|
end
|
34
40
|
|
35
41
|
def icon_file_names
|
data/lib/phlex/icons/flag.rb
CHANGED
data/lib/phlex/icons/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phlex-icons-flag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ali Hamdi Ali Fadel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: phlex
|