Module: Icons::Configuration::Phosphor

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

Instance Method Summary collapse

Instance Method Details

#configObject



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/icons/configuration/phosphor.rb', line 10

def config
  Options.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



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

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



50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/icons/configuration/phosphor.rb', line 50

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



64
65
66
67
68
69
70
# File 'lib/icons/configuration/phosphor.rb', line 64

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