Documentation ¶
Index ¶
- Variables
- func Build(repo *Repository, opts BuildOptions) error
- func Clean(repo *Repository) error
- func Deps(repo *Repository) error
- func EnsureTmp(repo *Repository) error
- func Pack(repo *Repository, pkg *Package) error
- func Publish(repo *Repository, pkg *Package) error
- func Run(repo *Repository, opts RunOptions) error
- func TempDir(repo *Repository, prefix string) (string, error)
- func TempFile(repo *Repository, prefix string) (*os.File, error)
- func WriteJSON(filename string, data interface{}) (err error)
- func WritePackageJSON(metadata PackageMetadata, dir string) error
- type BuildOptions
- type Config
- type Package
- type PackageConfig
- type PackageMetadata
- type Repository
- type RunOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoConfig = fmt.Errorf("cannot find %s config file", configName)
Functions ¶
func Build ¶
func Build(repo *Repository, opts BuildOptions) error
func Clean ¶
func Clean(repo *Repository) error
func Deps ¶
func Deps(repo *Repository) error
func EnsureTmp ¶
func EnsureTmp(repo *Repository) error
func Pack ¶
func Pack(repo *Repository, pkg *Package) error
func Publish ¶
func Publish(repo *Repository, pkg *Package) error
func Run ¶
func Run(repo *Repository, opts RunOptions) error
func WritePackageJSON ¶
func WritePackageJSON(metadata PackageMetadata, dir string) error
Types ¶
type BuildOptions ¶
type Config ¶
type Config struct { Packages map[string]PackageConfig Dependencies map[string]string }
func LoadConfig ¶
type PackageConfig ¶
type PackageMetadata ¶
type PackageMetadata struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Version string `json:"version,omitempty"` Private bool `json:"private"` Main string `json:"main,omitempty"` Dependencies map[string]string `json:"dependencies"` }
func ReadPackageJSON ¶
func ReadPackageJSON(dir string) (*PackageMetadata, error)
type Repository ¶
type Repository struct { ConfigPath string RootDir string OutDir string DistDir string TmpDir string Packages map[string]*Package Dependencies map[string]string }
func LoadRepository ¶
func LoadRepository(searchDir string) (*Repository, error)
type RunOptions ¶
Click to show internal directories.
Click to hide internal directories.