generators/bootstrap.rb in phlex-icons-radix-0.16.0 vs generators/bootstrap.rb in phlex-icons-radix-0.17.0

- old
+ new

@@ -2,10 +2,11 @@ require_relative 'helper' REPO_URL = 'https://github.com/twbs/icons.git' REPO_NAME = 'twbs-icons' +ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/bootstrap.rb' ICONS_PACK_PATH = 'lib/phlex/icons/bootstrap' TEMPLATE = ERB.new <<~TEMPLATE # frozen_string_literal: true @@ -37,10 +38,15 @@ '9-' => 'nine-', '123' => 'one-two-three' }.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/*") end