bower

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MPL-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bower

type Bower struct {
	Cmd    string
	Config Config
}

func New

func New(cmd, dir string) (*Bower, *errors.Error)

func (*Bower) Clean

func (b *Bower) Clean() *errors.Error

func (*Bower) Install

func (b *Bower) Install(production bool) *errors.Error

func (*Bower) List

func (b *Bower) List() (Package, *errors.Error)

type Config

type Config struct {
	CWD       string `json:"cwd"`
	Directory string `json:"directory"`
}

Config models a bower configuration file: https://bower.io/docs/config/.

func ReadConfig

func ReadConfig(dir string) (Config, *errors.Error)

TODO: this is nowhere near complete -- there's all sorts of crazy cascading mechanisms that configure Bower.

func ReadConfigFile

func ReadConfigFile(filename string) (Config, *errors.Error)

ReadConfigFile attempts to unmarshal the Bower configuration file.

type Endpoint

type Endpoint struct {
	Name   string
	Source string
	Target string
}

type Manifest

type Manifest struct {
	Name            string
	DevDependencies map[string]string
	Dependencies    map[string]string
}

func ReadManifest

func ReadManifest(filename string) (Manifest, *errors.Error)

type Package

type Package struct {
	Endpoint     Endpoint
	PkgMeta      PackageMetadata
	Dependencies map[string]Package
	Missing      bool
}

func FromComponents

func FromComponents(dir string) ([]Package, *errors.Error)

type PackageMetadata

type PackageMetadata struct {
	Name    string
	Version string

	TargetName    string `json:"_originalSource"`
	TargetVersion string `json:"_target"`
}

Jump to

Keyboard shortcuts

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