lib/index.js
function getGeneratorConfig(options) {
  const { tag, classNames } = parseSelector(options.baseSelector)
  const config = {
    files           : options.paths,
    dest            : options.outputDir,
    types           : options.types,
    codepoints      : options.codepointsMap,
    startCodepoint  : options.startCodepoint || 0xF101,
    cssDest         : options.cssPath,
    cssFontsUrl     : getCssFontsUrl(options),
    htmlDest        : options.htmlPath,
    cssTemplate     : options.cssTemplate  || TEMPLATES.css,
    htmlTemplate    : options.htmlTemplate || TEMPLATES.html,
    templateOptions : {
      baseTag             : tag || options.baseTag || 'i',
      baseSelector        : options.baseSelector || null,
      baseClassNames      : classNames.join(' '),
      classPrefix         : (options.classPrefix || 'icon') + '-',
      htmlCssRelativePath : path.relative(
        path.dirname(getResolvedPath(options, 'html')),
        getResolvedPath(options, 'css')
      )
    }
  }

  // Normalise and add available optional configurations
  OPTIONAL_PARAMS.forEach(key => {
    if (typeof options[key] !== 'undefined') {
      // Parse numeric values
      if (`${ parseFloat(options[key]) }` === `${ options[key] }`) {
        options[key] = parseFloat(options[key])
      }

      config[key] = options[key]
    }
  })

  return config
}
function getGeneratorConfig(options) {
  const { tag, classNames } = parseSelector(options.baseSelector)
  const config = {
    files           : options.paths,
    dest            : options.outputDir,
    types           : options.types,
    codepoints      : options.codepointsMap,
    startCodepoint  : options.startCodepoint || 0xF101,
    cssDest         : options.cssPath,
    cssFontsUrl     : getCssFontsUrl(options),
    htmlDest        : options.htmlPath,
    cssTemplate     : options.cssTemplate  || TEMPLATES.css,
    htmlTemplate    : options.htmlTemplate || TEMPLATES.html,
    templateOptions : {
      baseTag             : tag || options.baseTag || 'i',
      baseSelector        : options.baseSelector || null,
      baseClassNames      : classNames.join(' '),
      classPrefix         : (options.classPrefix || 'icon') + '-',
      htmlCssRelativePath : path.relative(
        path.dirname(getResolvedPath(options, 'html')),
        getResolvedPath(options, 'css')
      )
    }
  }

  // Normalise and add available optional configurations
  OPTIONAL_PARAMS.forEach(key => {
    if (typeof options[key] !== 'undefined') {
      // Parse numeric values
      if (`${ parseFloat(options[key]) }` === `${ options[key] }`) {
        options[key] = parseFloat(options[key])
      }

      config[key] = options[key]
    }
  })

  return config
}
function getGeneratorConfig ( options ) { const { tag , classNames } = parseSelector ( options . baseSelector ) const config = { files : options . paths , dest : options . outputDir , types : options . types , codepoints : options . codepointsMap , startCodepoint : options . startCodepoint || 0xF101 , cssDest : options . cssPath , cssFontsUrl : getCssFontsUrl ( options ) , htmlDest : options . htmlPath , cssTemplate : options . cssTemplate || TEMPLATES . css , htmlTemplate : options . htmlTemplate || TEMPLATES . html , templateOptions : { baseTag : tag || options . baseTag || 'i' , baseSelector : options . baseSelector || null , baseClassNames : classNames . join ( ' ' ) , classPrefix : ( options . classPrefix || 'icon' ) + '-' , htmlCssRelativePath : path . relative ( path . dirname ( getResolvedPath ( options , 'html' ) ) , getResolvedPath ( options , 'css' ) ) } } // Normalise and add available optional configurations OPTIONAL_PARAMS . forEach ( key => { if ( typeof options [ key ] !== 'undefined' ) { // Parse numeric values if ( ` ${ parseFloat ( options [ key ] ) } ` === ` ${ options [ key ] } ` ) { options [ key ] = parseFloat ( options [ key ] ) } config [ key ] = options [ key ] } } ) return config }
Transform options Object in a configuration accepted by the generator

@param  {Object} options
@return {void}
Transform options Object in a configuration accepted by the generator