blogin clean
Remove the output directory produced by a build, leaving the content, layouts, and configuration in place.
blogin clean [--out <dir>] [--verbose]
Options#
-o,--out <dir>- the directory to remove. Naming one makes it the only target.
-v,--verbose- prints extra detail.
With no --out, both directories a build can write are removed: the output-dir
from blogin.json, or public when the config does not set one, and
.blogin-preview/, where blogin serve builds. Each is
reported separately, and one that does not exist is skipped.
The target must sit inside the current directory. A path outside it is refused so
a stray --out cannot delete unrelated files. The command reports how many files
it removed.
A .keep file is yours rather than build output, so it survives, and so does the
directory holding it. Keep one at public/.keep to track the output directory in
version control.
Every option also has a one-letter spelling, listed on blogin build.
Example#
blogin clean --out dist