basil

package
v0.0.0-...-5ac2c9a Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src string, dst string) error

func Exists

func Exists(path string) bool

func IsDir

func IsDir(path string) bool

func MakeDir

func MakeDir(dir string) error

func WriteFile

func WriteFile(path string, data []byte) error

Types

type Basil

type Basil struct {
	// contains filtered or unexported fields
}

func (*Basil) AddFile

func (p *Basil) AddFile(path string, data []byte)

func (*Basil) AddScript

func (p *Basil) AddScript(src []byte)

func (*Basil) BaseDir

func (p *Basil) BaseDir() string

func (*Basil) Build

func (p *Basil) Build(middleware []Middleware) error

func (*Basil) Clean

func (p *Basil) Clean() error

func (*Basil) ConfigJson

func (p *Basil) ConfigJson() string

func (*Basil) DistDir

func (p *Basil) DistDir() string

func (*Basil) Middlewares

func (p *Basil) Middlewares() []string

func (*Basil) Minify

func (p *Basil) Minify() bool

func (*Basil) Read

func (p *Basil) Read(baseDir string) error

type Config

type Config struct {
	Title        string   `json:"title"`
	ExternScript []string `json:"extern-script"`
	Minify       bool     `json:"minify"`

	Middleware []string `json:"middleware"`
	Script     []string `json:"script"`
	Resource   []string `json:"resource"`
}

func (*Config) Read

func (p *Config) Read(path string) error

type File

type File struct {
	Name string
	Data []byte
}

func (*File) Write

func (f *File) Write(baseDir string) error

type Middleware

type Middleware interface {
	PreBuild(bsl *Basil) error
}

Jump to

Keyboard shortcuts

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