Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AtomManifest(val name: String, val version: String, val entrypoint: String, val description: String? = null, val authors: List<String> = emptyList(), val minQuarkdownVersion: String? = null, val categories: List<String> = emptyList(), val repository: String? = null, val license: String? = null)

Metadata of a package ("atom"), as declared in the atom table of its manifest.

Link copied to clipboard
data class PackageFile(val path: String, val content: () -> ByteArray)

A file belonging to a package.

Link copied to clipboard
data class PackageIdentifier(val scope: String, val name: String)

Identifies a package independently of its version.

Link copied to clipboard
@Serializable
data class PackageManifest(val atom: AtomManifest, val template: TemplateManifest? = null)

Root of a package manifest.

Link copied to clipboard
data class PackageReference(val identifier: PackageIdentifier, val version: String)

A reference to an exact version of a package, as written in Quarkdown source: @<scope>/<name>:<version>.

Link copied to clipboard

A source of packages, such as a remote Git repository.

Link copied to clipboard
data class RepositoryPackage(val manifest: PackageManifest, val files: List<PackageFile>)

A package resolved from a PackageRepository.

Link copied to clipboard
@Serializable
data class TemplateManifest(val doctype: String? = null, val content: String, val additionalFiles: List<String> = emptyList(), val enforceTheme: Boolean = false)

Declaration that makes a package usable as a project template, as declared in the template table of its manifest.

Functions

Link copied to clipboard

Loads every file of this package into a new in-memory file system, rooted at /.

Loads these files into a new in-memory file system, rooted at /, each at its package-relative path. The result can be read through the regular file system API, included into a document, or exported to disk via FsEntry.toOutputResources().

Link copied to clipboard

Picks the newest of versions by semantic-version precedence.