CRDoc::Shards::Builder
Turns a source tree into slim docs JSON.
Constants
Top-level entries copied from a local tree. README* and LICENSE* also match.
Build directories older than this are leftovers from an interrupted run.
Class methods
Runs crystal docs in dir and returns the slim JSON.
Clones url into dest and returns the resolved HEAD commit. label names the repository in error messages.
Copies the parts of source that docs need into dest: shard.yml,
shard.lock, src/, and README and LICENSE files.
Installs runtime dependencies into <dir>/lib.
Reads name, version and dependency presence from <dir>/shard.yml.
Removes children of root last modified over STALE_TEMP_AGE ago.
Yields a fresh temp directory and removes it afterwards, also on INT/TERM (which exit 130). Leftovers from earlier interrupted builds are swept first.