 : with-scaffold ( quot -- )
     [ H{ } clone using ] dip with-variable ; inline
 
-PRIVATE>
-
 : link-vocab ( vocab -- )
     check-vocab
     "Edit documentation: " write

: docs. ( word -- )
    [ (docs.) ] [ nl vocabulary>> link-vocab ] bi ;

: scaffold-docs ( vocab -- )
    [
        dup "-docs.factor" vocab/suffix>path scaffolding? [
            set-scaffold-docs-file


: set-scaffold-tests-file ( vocab path -- )
    [ tests-file-string ] dip utf8 set-file-contents ;

PRIVATE>

: scaffold-tests ( vocab -- )
    dup "-tests.factor" vocab/suffix>path
