bundler

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBytes

func DecodeBytes(manifestData []byte, val any) error

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

type Template

type Template struct {
	Entrypoint string `toml:"entrypoint" json:"entrypoint"`
	Path       string `toml:"path" json:"path"`
	Thumbnail  string `toml:"thumbnail" json:"thumbnail"`
}

Template represents template-specific configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL