buildCollection
buildCollection(
events,options?):SerializedCollection
Assemble a portable SerializedCollection from plain configs — the
stateless half of CalendaryInstance.toCollection: no engine instance,
no expansion, just configs → document. Pass plugins (the same instances you
would use()) to derive the manifest, and schema to stamp $schema so you
don’t graft it yourself.
Parameters
Section titled “Parameters”events
Section titled “events”options?
Section titled “options?”string
plugins?
Section titled “plugins?”schema?
Section titled “schema?”string
version?
Section titled “version?”string
Returns
Section titled “Returns”Example
Section titled “Example”const cdy = buildCollection(configs, { name: "family", plugins: [lunar(), liturgical()], schema: "https://calendaryjs.dev/schema/cdy.json",});// → { $schema, collection: "family", plugins: [...], events: configs }