• Generate a complete set of web icons and configuration files from a single source image. This is the main function exposed by the library and serves as the entry point for all icon generation operations.

    The function handles:

    • Creating all required directories
    • Generating various icon types (favicon, Apple, Android, Microsoft)
    • Creating configuration files (webmanifest, browserconfig.xml)
    • Producing HTML integration instructions

    Parameters

    • config: GenerationConfig

      User-provided configuration containing source image path, application name, and output directory

    Returns Promise<GenerationResults>

    • Comprehensive results object detailing the outcome of each generation operation
    // With verbose logging
    const results = await generateIcons({
    sourceImage: 'path/to/logo.png',
    name: 'My Application',
    outputDir: 'static',
    verbose: true
    });

    Will throw an error if critical operations fail, such as the source image not being found