public function generateContent($destination)
    {
        $pathsWrittenTo = [];

        $packageStructure = $this->pathManager->emitStructure($destination);

        // At this point, since the file structure has been emitted we can add the
        // PathManager's file name collector to the template renderer so that the
        // 'path' (and other) functions work as expected.
        $this->getRenderer()->addCollector($this->getPathManager()->getCollector());
        $this->getRenderer()->addCollector(app(InputCollector::class));
        
        $this->pathManager->getRenderer()->setIgnoreUnloadedTemplateErrors(true);

        foreach ($packageStructure as $packageFile) {
            if ($this->fileSystem->exists($packageFile['full'])) {
                if (!$this->shouldCopyFileInstead($packageFile['original'])) {
                    $packageFileContents = $this->pathManager->getRenderer()->render($packageFile['original']);

                    if ($packageFileContents != null && strlen($packageFileContents) > 0) {
                        $this->fileSystem->put($packageFile['full'], $packageFileContents);
                        $pathsWrittenTo[] = $packageFile;
                    }
                } else {
                    // Copy the file instead.
                    $this->fileSystem->copy($packageFile['origin'], $packageFile['full']);
                }
            }
        }

        $this->pathManager->getRenderer()->setIgnoreUnloadedTemplateErrors(false);

        return $pathsWrittenTo;
    }