public function process(IOInterface $io, array $libraries, $methodKey = null)
    {
        // No-op
        if (empty($libraries)) {
            return;
        }

        // Setup root folder
        $this->setupResources($io);

        // Get or choose method
        if (!$methodKey) {
            $methodKey = $this->getMethodKey();
        }
        $method = $this->getMethod($methodKey);

        // Update all modules
        foreach ($libraries as $module) {
            // Skip this module if no exposure required
            if (!$module->requiresExpose()) {
                continue;
            }
            $name = $module->getName();
            $type = $module->getType();
            $io->write(
                "Exposing web directories for {$type} <info>{$name}</info> with method <info>{$methodKey}</info>:"
            );
            foreach ($module->getExposedFolders() as $folder) {
                $io->write("  - <info>$folder</info>");
            }

            // Expose web dirs with given method
            $module->exposePaths($method);
        }

        // On success, write `.method` token to persist for subsequent updates
        $this->saveMethodKey($methodKey);
    }