Skip to content

Commit

Permalink
addresses #232 missing typegraphs.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
finanalyst committed Apr 2, 2023
1 parent 846ff14 commit d52b517
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Website/plugins/typegraph/add-type-graph.raku
Expand Up @@ -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<no-status>;
mkdir 'typegraphs' unless 'typegraphs'.IO ~~ :e & :d;
Expand Down

0 comments on commit d52b517

Please sign in to comment.