generators/remix.rb in phlex-icons-0.16.0 vs generators/remix.rb in phlex-icons-0.17.0
- old
+ new
@@ -2,10 +2,11 @@
require_relative 'helper'
REPO_URL = 'https://github.com/Remix-Design/RemixIcon.git'
REPO_NAME = 'remix-design-remixicon'
+ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/remix.rb'
ICONS_PACK_PATH = 'lib/phlex/icons/remix'
TEMPLATE = ERB.new <<~TEMPLATE
# frozen_string_literal: true
@@ -28,10 +29,15 @@
'4k-' => 'four-k-',
'24-' => 'twenty-four-'
}.freeze
def main
- run_generator { icon_file_paths.tqdm.each { create_icon_component(_1) } }
+ run_generator do
+ new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
+ update_icon_path_version(new_version)
+
+ icon_file_paths.tqdm.each { create_icon_component(_1) }
+ end
end
def icon_file_paths
Dir.glob("generators/#{REPO_NAME}/icons/**/*.svg")
end