Skip to content

Commit

Permalink
Change gem name from phlex_icons to phlex-icons
Browse files Browse the repository at this point in the history
  • Loading branch information
AliOsm committed Sep 3, 2024
1 parent 2b44181 commit 46531b1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/prepare-new-gem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ for pack in $packs; do
if [ "$pack" != "$pack_to_keep" ]; then
rm -rf "lib/phlex/icons/$pack"
rm -f "lib/phlex/icons/$pack.rb"
sed -i "/require_relative 'phlex\/icons\/$pack'/d" lib/phlex_icons.rb
sed -i "/require_relative 'phlex\/icons\/$pack'/d" lib/phlex-icons.rb
fi
done

Expand All @@ -28,7 +28,7 @@ require_relative '"'"'../base'"'"'
' "lib/phlex/icons/${pack_to_keep}/base.rb"

# Rename the main file and gemspec
mv lib/phlex_icons.rb "lib/phlex_icons_${pack_to_keep}.rb"
mv lib/phlex-icons.rb "lib/phlex-icons-${pack_to_keep}.rb"

sed -i "s/spec.name = 'phlex-icons'/spec.name = 'phlex-icons-${pack_to_keep}'/" phlex-icons.gemspec
sed -i "s/spec.summary = 'Icons library for Phlex'/spec.summary = '${pack_to_keep_cap} icons library for Phlex'/" phlex-icons.gemspec
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Phlex::Icons::Tabler.configuration.default_variant = :outline # or :filled
### With `Phlex::Kit`

```ruby
require 'phlex_icons'
require 'phlex-icons'

class PhlexIcons < Phlex::HTML
include Phlex::Icons
Expand All @@ -146,7 +146,7 @@ end
### Without `Phlex::Kit`

```ruby
require 'phlex_icons'
require 'phlex-icons'

class PhlexIcons < Phlex::HTML
def view_template
Expand All @@ -172,8 +172,8 @@ Let's say you want to use only Heroicons and Flag Icons, you can use the followi
Then, in your application, you can use the icons like this:

```ruby
require 'phlex_icons_flag'
require 'phlex_icons_hero'
require 'phlex-icons-flag'
require 'phlex-icons-hero'

class PhlexIcons < Phlex::HTML
include Phlex::Icons # If you want to use Phlex::Kit.
Expand Down
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

require 'bundler/setup'
require 'phlex_icons'
require 'phlex-icons'

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
Expand Down
5 changes: 3 additions & 2 deletions lib/phlex_icons.rb → lib/phlex-icons.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# rubocop:disable Naming/FileName
# rubocop:enable Naming/FileName

# frozen_string_literal: true

require 'phlex'
Expand All @@ -6,8 +9,6 @@
require_relative 'phlex/icons/configuration'
require_relative 'phlex/icons/version'

require_relative 'phlex/icons/railtie' if defined?(Rails)

require_relative 'phlex/icons/bootstrap'
require_relative 'phlex/icons/flag'
require_relative 'phlex/icons/hero'
Expand Down

0 comments on commit 46531b1

Please sign in to comment.