module Spark::Shard
Extended Modules
Defined in:
spark/shard.crspark/shard/shard_content.cr
spark/shard/shard_file.cr
Instance Method Summary
-
#add_shard(name : String, *, development_only : Bool = false, **options)
Adds a shard to the project's
shard.yml
. -
#shard_file_path
Which path to search to find the Crystal shard definition.
-
#shard_file_path=(shard_file_path)
Control which path to search to find the Crystal shard definition.
Instance Method Detail
def add_shard(name : String, *, development_only : Bool = false, **options)
#
Adds a shard to the project's shard.yml
.
Example with a GitHub production dependency:
Spark::Shard.add_shard("spark", github: "stephendolan/spark", branch: "main")
Example with a GitHub development dependency:
Spark::Shard.add_shard("spark", github: "stephendolan/spark", version: "~> 1.0", development_only: true)
Example with a git dependency:
Spark::Shard.add_shard("spark", git: "https://mycustomserver.com/stephendolan/spark", version: "~> 1.0", development_only: true)
def shard_file_path=(shard_file_path)
#
Control which path to search to find the Crystal shard definition.