Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/vreg/node_modules/@nuxtjs/fontawesome/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/vreg/node_modules/@nuxtjs/fontawesome/lib/module.js
import path from 'path'
import consola from 'consola'

const logger = consola.withScope('fontawesome')

const defaults = {
  component: '',
  suffix: false,
  addCss: true,
  useLayers: true,
  useLayersText: true,
  icons: {},
  proIcons: {}
}

const faStyles = [
  'solid',
  'regular',
  'light',
  'duotone',
  'brands'
]

function validateIcons (icons) {
  for (const key in icons) {
    if (!faStyles.includes(key)) {
      logger.error(`Unsupported icons style '${key}', it will be removed`)
      delete icons[key]
    }
  }
}

export default function fontawesomeModule (moduleOptions) {
  const options = Object.assign(
    defaults,
    this.options.fontawesome,
    moduleOptions
  )

  if (options.imports && this.options.dev) {
    logger.warn('The \'imports\' option is deprecated and will be removed in a future version. Use \'icons\' instead')
  }

  validateIcons(options.icons)
  validateIcons(options.proIcons)

  // 'component' is also used to name the layer components
  if (!options.component || options.suffix) {
    options.suffix = 'Icon'
  }

  // set default component name after determining suffix
  if (!options.component) {
    options.component = 'FontAwesome'
  }

  if (options.addCss) {
    this.options.css.unshift('@fortawesome/fontawesome-svg-core/styles.css')
  }

  this.addPlugin({
    src: path.resolve(__dirname, 'plugin.js'),
    fileName: 'fontawesome.js',
    options
  })
}

Spamworldpro Mini