public static function addMainFiles(Config $config, PackageInterface $package, $section = 'main-files')
    {
        if ($package instanceof Package) {
            $packageExtra = $package->getExtra();
            $rootMainFiles = $config->getArray($section);

            foreach ($rootMainFiles as $packageName => $files) {
                if ($packageName === $package->getName()) {
                    $packageExtra['bower-asset-main'] = $files;

                    break;
                }
            }

            $package->setExtra($packageExtra);
        }

        return $package;
    }