Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBytes ¶
Types ¶
type Manifest ¶
type Manifest struct {
Package *Package `toml:"package" json:"package"`
Template *Template `toml:"template,omitempty" json:"template,omitempty"`
}
Manifest represents a Typst package manifest Based on official Typst package specification: https://github.com/typst/packages/blob/main/docs/manifest.md
type Package ¶
type Package struct {
Name string `toml:"name" json:"name"`
Version string `toml:"version" json:"version"`
Entrypoint string `toml:"entrypoint" json:"entrypoint"`
// Required for repository submission
Authors []string `toml:"authors" json:"authors"`
License string `toml:"license" json:"license"`
Description string `toml:"description" json:"description"`
// Optional fields
Homepage string `toml:"homepage" json:"homepage"`
Repository string `toml:"repository" json:"repository"`
Keywords []string `toml:"keywords" json:"keywords"`
// Discovery metadata
Categories []string `toml:"categories" json:"categories"`
Disciplines []string `toml:"disciplines" json:"disciplines"`
// Technical metadata
Compiler string `toml:"compiler" json:"compiler"`
Exclude []string `toml:"exclude" json:"exclude"`
}
type PackageCreator ¶
type PackageCreator struct {
// contains filtered or unexported fields
}
PackageCreator creates a Typst package from a directory
func NewPackageCreator ¶
func NewPackageCreator(exclude []string) *PackageCreator
NewPackageCreator creates a new PackageCreator
func (*PackageCreator) CreatePackage ¶
func (p *PackageCreator) CreatePackage(srcDir, outputPath string) error
CreatePackage creates a tar.gz package from the source directory
Click to show internal directories.
Click to hide internal directories.