src/Installer/ComponentInstaller.php
public static function postAutoloadDump(Event $event)
    {
        $composer = $event->getComposer();
        $config = $composer->getConfig();

        $vendorDir = realpath($config->get('vendor-dir'));
        if($config->has('component')){
            static::setConfig($config->get('component'));
        }

        $packages = $composer->getRepositoryManager()->getLocalRepository()->getPackages();
        $components = static::determineComponents($packages);
        $webrootDir = dirname($vendorDir) . DIRECTORY_SEPARATOR . 'webroot';

        $config = static::processComponents($components, $vendorDir, $webrootDir);

        $configFile = static::configFile($vendorDir);
        static::writeConfigFile($configFile, $config);
    }
public static function postAutoloadDump(Event $event)
    {
        $composer = $event->getComposer();
        $config = $composer->getConfig();

        $vendorDir = realpath($config->get('vendor-dir'));
        if($config->has('component')){
            static::setConfig($config->get('component'));
        }

        $packages = $composer->getRepositoryManager()->getLocalRepository()->getPackages();
        $components = static::determineComponents($packages);
        $webrootDir = dirname($vendorDir) . DIRECTORY_SEPARATOR . 'webroot';

        $config = static::processComponents($components, $vendorDir, $webrootDir);

        $configFile = static::configFile($vendorDir);
        static::writeConfigFile($configFile, $config);
    }
Called whenever composer (re)generates the autoloader

@param Event $event the composer event object
@return void