module

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2018 License: AGPL-3.0 Imports: 0 Imported by: 4 modules, 51 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (

	// Bower is the module type for bower.io
	Bower = Type("bower")
	// Composer is the module type for getcomposer.org
	Composer = Type("composer")
	// Maven is the module type for maven.apache.org
	Maven = Type("maven")
	// SBT is the module type for scala-sbt.org
	SBT = Type("sbt")

	// Ruby is the module type for Bundler (bundler.io)
	Ruby = Type("ruby")
	// Nodejs is the module type for NPM (npmjs.org) and Yarn (yarnpkg.com)
	Nodejs = Type("nodejs")
	// Golang is the module type for dep, glide, godep, govendor, vndr, and manual
	// gopath vendoring
	Golang = Type("golang")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	// Initialize gathers build environment information and does build setup.
	Initialize() error
	// Build runs a best-effort attempt at building the module.
	Build(m Module, force bool) error
	// Analyze returns the dependencies of a module.
	Analyze(m Module, allowUnresolved bool) ([]Dependency, error)

	// IsBuilt checks whether a module has been built.
	IsBuilt(m Module, allowUnresolved bool) (bool, error)
	// IsModule checks whether a build target is a valid module. This is used for
	// inferring default configurations.
	IsModule(target string) (bool, error)
	InferModule(target string) (Module, error)
}

A Builder is an implementation of functionality for different build systems.

type Dependency

type Dependency interface {
	// Locator fields
	Fetcher() string
	Package() string
	Revision() string
}

Dependency represents a code library brought in by running a Build

type Locator

type Locator string

Locator is a string specifying a particular dependency and revision

func MakeLocator

func MakeLocator(d Dependency) Locator

MakeLocator transforms Dependencies into locator strings

type Module

type Module struct {
	Name string
	Type Type
	// Target is the entry point or manifest path for the build system. The exact
	// meaning is Type-dependent.
	Target string
	// Dir is the absolute path to the module's working directory (the directory
	// you would normally run the build command from).
	Dir string
}

A Module is a unit of buildable code within a project.

type Type

type Type string

Type is an enumeration of supported build system types

Jump to

Keyboard shortcuts

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