Using Crystal Shards
If you remember Chapter 4, Exploring Crystal via Writing a Command-Line Interface, when we were first scaffolding out the project, there was the shard.yml
file that was created as part of that process, but we did not really get into what it was for. The time has come to more fully explore what the purpose of this file is. The gist of it is that this file contains various metadata about the Shard, such as its name, version, and what external dependencies it has (if any). As a refresher, the shard.yml
file from that project looked like this:
name: transform version: 0.1.0 authors: - George Dietrich <george@dietrich.app> crystal: ~> 1.4.0 license: MIT targets: transform: main: src/transform_cli.cr
Similarly to how we have been interacting with our Crystal applications thus far using the crystal
binary, there is a dedicated binary for interacting with Crystal Shards, aptly named shards
. We used...