Add support for `docc` documentation in ProjectDescriptionHelpers (#5198)

This commit is contained in:
Mike Simons 2023-05-30 15:20:38 -04:00 committed by GitHub
parent a78fa23a97
commit 8f45914756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 2 deletions

View File

@ -139,7 +139,10 @@ final class ProjectEditor: ProjectEditing {
let dependenciesPath = manifestFilesLocator.locateDependencies(at: editingPath)
let helpers = helpersDirectoryLocator.locate(at: editingPath).map {
FileHandler.shared.glob($0, glob: "**/*.swift")
[
FileHandler.shared.glob($0, glob: "**/*.swift"),
FileHandler.shared.glob($0, glob: "**/*.docc"),
].flatMap { $0 }
} ?? []
let templates = templatesDirectoryLocator.locateUserTemplates(at: editingPath).map {

View File

@ -85,7 +85,7 @@ final class ProjectEditorTests: TuistUnitTestCase {
let graph = Graph.test(name: "Edit")
let helpersDirectory = directory.appending(component: "ProjectDescriptionHelpers")
try FileHandler.shared.createFolder(helpersDirectory)
let helpers = ["A.swift", "B.swift"].map { helpersDirectory.appending(component: $0) }
let helpers = ["A.swift", "B.swift", "Documentation.docc"].map { helpersDirectory.appending(component: $0) }
try helpers.forEach { try FileHandler.shared.touch($0) }
let manifests = [
ManifestFilesLocator.ProjectManifest(

View File

@ -0,0 +1,13 @@
# ``ProjectDescriptionHelpers``
<!--@START_MENU_TOKEN@-->Summary<!--@END_MENU_TOKEN@-->
## Overview
<!--@START_MENU_TOKEN@-->Text<!--@END_MENU_TOKEN@-->
## Topics
### <!--@START_MENU_TOKEN@-->Group<!--@END_MENU_TOKEN@-->
- <!--@START_MENU_TOKEN@-->``Symbol``<!--@END_MENU_TOKEN@-->