lib/index.js
async function generate(options = {}) {
  options = Object.assign(DEFAULT_OPTIONS, options)

  // Log start
  let msg = `Generating font kit from ${ options.paths.length } SVG icons`.yellow
  log(options, msg)

  // Run validation over options
  await validateOptions(options)

  if (options.codepoints) {
    options.codepointsMap = await getCodepointsMap(options.codepoints)
  }

  // Run font generation
  const config = getGeneratorConfig(options)
  const generatorResult = await fontGenerator(config)

  // Clean up after generator
  await deleteUnspecifiedTypes(options)

  // If specified, generate JSON map
  if (options.json) {
    await generateJson(options, generatorResult)
  }

  // Log generated files
  logReport(options)
}
async function generate(options = {}) {
  options = Object.assign(DEFAULT_OPTIONS, options)

  // Log start
  let msg = `Generating font kit from ${ options.paths.length } SVG icons`.yellow
  log(options, msg)

  // Run validation over options
  await validateOptions(options)

  if (options.codepoints) {
    options.codepointsMap = await getCodepointsMap(options.codepoints)
  }

  // Run font generation
  const config = getGeneratorConfig(options)
  const generatorResult = await fontGenerator(config)

  // Clean up after generator
  await deleteUnspecifiedTypes(options)

  // If specified, generate JSON map
  if (options.json) {
    await generateJson(options, generatorResult)
  }

  // Log generated files
  logReport(options)
}
async function generate ( options = { } ) { options = Object . assign ( DEFAULT_OPTIONS , options ) // Log start let msg = ` ${ options . paths . length } ` . yellow log ( options , msg ) // Run validation over options await validateOptions ( options ) if ( options . codepoints ) { options . codepointsMap = await getCodepointsMap ( options . codepoints ) } // Run font generation const config = getGeneratorConfig ( options ) const generatorResult = await fontGenerator ( config ) // Clean up after generator await deleteUnspecifiedTypes ( options ) // If specified, generate JSON map if ( options . json ) { await generateJson ( options , generatorResult ) } // Log generated files logReport ( options ) }
Generate icon font set asynchronously

@param  {Object} options
@param  {Function} callback
@return {void}
Generate icon font set asynchronously