tools.scaffold: make sure vocab does not exist.
parent
c99ab4a652
commit
68eb683387
|
@ -14,6 +14,8 @@ SYMBOL: using
|
|||
|
||||
ERROR: not-a-vocab-root string ;
|
||||
|
||||
ERROR: vocab-must-not-exist string ;
|
||||
|
||||
<PRIVATE
|
||||
|
||||
: vocab-root? ( string -- ? )
|
||||
|
@ -28,6 +30,9 @@ ERROR: not-a-vocab-root string ;
|
|||
: check-vocab-root/vocab ( vocab-root string -- vocab-root string )
|
||||
[ check-root ] [ check-vocab-name ] bi* ;
|
||||
|
||||
: check-vocab-exists ( string -- string )
|
||||
dup vocab-exists? [ vocab-must-not-exist ] when ;
|
||||
|
||||
: replace-vocab-separators ( vocab -- path )
|
||||
path-separator first CHAR: . associate substitute ; inline
|
||||
|
||||
|
@ -273,7 +278,7 @@ PRIVATE>
|
|||
[ "platforms.txt" ] dip scaffold-metadata ;
|
||||
|
||||
: scaffold-vocab ( vocab-root string -- )
|
||||
{
|
||||
check-vocab-exists {
|
||||
[ scaffold-directory ]
|
||||
[ scaffold-main ]
|
||||
[ nip require ]
|
||||
|
|
Loading…
Reference in New Issue