Module: RailsIcons::Configuration::Phosphor

Extended by:
Phosphor
Included in:
Phosphor
Defined in:
lib/rails_icons/configuration/phosphor.rb

Instance Method Summary collapse

Instance Method Details

#configObject



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/rails_icons/configuration/phosphor.rb', line 8

def config
  ActiveSupport::OrderedOptions.new.tap do |options|
    options.default_variant = :regular
    options.exclude_variants = []

    setup_bold_config(options)
    setup_duotone_config(options)
    setup_fill_config(options)
    setup_light_config(options)
    setup_regular_config(options)
    setup_thin_config(options)
  end
end

#initializer_configObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rails_icons/configuration/phosphor.rb', line 22

def initializer_config
  <<~RB.indent(2)
    # Override Phosphor defaults
    # config.libraries.phosphor.default_variant = "" # Set a default variant for Phosphor
    # config.libraries.phosphor.exclude_variants = [:duotone, :thin] # Exclude specific variants

    # config.libraries.phosphor.bold.default.css = "size-6"
    # config.libraries.phosphor.bold.default.data = {}

    # config.libraries.phosphor.duotone.default.css = "size-6"
    # config.libraries.phosphor.duotone.default.data = {}

    # config.libraries.phosphor.fill.default.css = "size-6"
    # config.libraries.phosphor.fill.default.data = {}

    # config.libraries.phosphor.light.default.css = "size-6"
    # config.libraries.phosphor.light.default.data = {}

    # config.libraries.phosphor.regular.default.css = "size-6"
    # config.libraries.phosphor.regular.default.data = {}

    # config.libraries.phosphor.thin.default.css = "size-6"
    # config.libraries.phosphor.thin.default.data = {}
  RB
end

#sourceObject



48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/rails_icons/configuration/phosphor.rb', line 48

def source
  {
    url: "https://github.com/phosphor-icons/core.git",
    variants: {
      bold: "raw/bold",
      duotone: "raw/duotone",
      fill: "raw/fill",
      light: "raw/light",
      regular: "raw/regular",
      thin: "raw/thin"
    }
  }
end

#transformationsObject



62
63
64
65
66
67
68
# File 'lib/rails_icons/configuration/phosphor.rb', line 62

def transformations
  {
    filenames: {
      delete_suffix: ["-bold", "-duotone", "-fill", "-light", "-thin"]
    }
  }
end