From d52b517cda14c27d57b6f5859cf437cc95308add Mon Sep 17 00:00:00 2001 From: finanalyst Date: Sun, 2 Apr 2023 17:37:06 +0100 Subject: [PATCH] addresses #232 missing typegraphs. Raku/doc-website is missing the generated svg typegraphs. They should be generated at build time by the plugin `Website/plugins/typegraph`. The original logic was disrupted because a file `.placeholder` was inserted to keep the directory. The logic has been changed. If there are no typegraphs they will be generated in the build environment. --- Website/plugins/typegraph/add-type-graph.raku | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Website/plugins/typegraph/add-type-graph.raku b/Website/plugins/typegraph/add-type-graph.raku index 9a998ec..400809b 100644 --- a/Website/plugins/typegraph/add-type-graph.raku +++ b/Website/plugins/typegraph/add-type-graph.raku @@ -4,9 +4,11 @@ use Doc::TypeGraph::Viz; use Collection::Progress; sub ($pp, %options) { - unless 'typegraphs'.IO ~~ :e & :d - and 'type-graph.txt'.IO.modified le 'typegraphs'.IO.modified - and +'typegraphs'.IO.dir + unless ( + ('typegraphs'.IO ~~ :e & :d) + and ( 'type-graph.txt'.IO.modified le 'typegraphs'.IO.modified ) + and ( +'typegraphs'.IO.dir > 1 ) + ) { note 'Generating Typegraphs' unless %options; mkdir 'typegraphs' unless 'typegraphs'.IO ~~ :e & :d;