aboutsummaryrefslogtreecommitdiff
path: root/plugins/all-module-page/src/main/kotlin/AllModulesPageGeneration.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/all-module-page/src/main/kotlin/AllModulesPageGeneration.kt')
-rw-r--r--plugins/all-module-page/src/main/kotlin/AllModulesPageGeneration.kt40
1 files changed, 0 insertions, 40 deletions
diff --git a/plugins/all-module-page/src/main/kotlin/AllModulesPageGeneration.kt b/plugins/all-module-page/src/main/kotlin/AllModulesPageGeneration.kt
deleted file mode 100644
index 1ba63627..00000000
--- a/plugins/all-module-page/src/main/kotlin/AllModulesPageGeneration.kt
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.jetbrains.dokka.allModulesPage
-
-import org.jetbrains.dokka.CoreExtensions
-import org.jetbrains.dokka.Timer
-import org.jetbrains.dokka.generation.Generation
-import org.jetbrains.dokka.pages.RootPageNode
-import org.jetbrains.dokka.plugability.DokkaContext
-import org.jetbrains.dokka.plugability.plugin
-import org.jetbrains.dokka.plugability.query
-import org.jetbrains.dokka.plugability.querySingle
-
-class AllModulesPageGeneration(private val context: DokkaContext) : Generation {
-
- override fun Timer.generate() {
- report("Creating all modules page")
- val pages = createAllModulePage()
-
- report("Transforming pages")
- val transformedPages = transformAllModulesPage(pages)
-
- report("Rendering")
- render(transformedPages)
-
- report("Processing submodules")
- allModulesPagePlugin().querySingle { templateProcessor }.process()
- }
-
- override val generationName = "index page for project"
-
- fun createAllModulePage() = allModulesPagePlugin().querySingle { allModulePageCreator }.invoke()
-
- fun transformAllModulesPage(pages: RootPageNode) =
- allModulesPagePlugin().query { allModulePageTransformer }.fold(pages) { acc, t -> t(acc) }
-
- fun render(transformedPages: RootPageNode) {
- context.single(CoreExtensions.renderer).render(transformedPages)
- }
-
- private fun allModulesPagePlugin() = context.plugin<AllModulesPagePlugin>()
-} \ No newline at end of file