meta – github.com/gobuffalo/meta Index | Files

package meta

import "github.com/gobuffalo/meta"

Index

Constants

const Version = "v0.3.3"

Functions

func ResolveSymlinks(p string) string

ResolveSymlinks takes a path and gets the pointed path if the original one is a symlink.

Types

type App

type App struct {
	Pwd         string      `json:"pwd" toml:"-"`
	Root        string      `json:"root" toml:"-"`
	GoPath      string      `json:"go_path" toml:"-"`
	PackagePkg  string      `json:"package_path" toml:"-"`
	ActionsPkg  string      `json:"actions_path" toml:"-"`
	ModelsPkg   string      `json:"models_path" toml:"-"`
	GriftsPkg   string      `json:"grifts_path" toml:"-"`
	WithModules bool        `json:"with_modules" toml:"-"`
	Name        name.Ident  `json:"name" toml:"name"`
	Bin         string      `json:"bin" toml:"bin"`
	VCS         string      `json:"vcs" toml:"vcs"`
	WithPop     bool        `json:"with_pop" toml:"with_pop"`
	WithSQLite  bool        `json:"with_sqlite" toml:"with_sqlite"`
	WithDep     bool        `json:"with_dep" toml:"with_dep"`
	WithWebpack bool        `json:"with_webpack" toml:"with_webpack"`
	WithNodeJs  bool        `json:"with_nodejs" toml:"with_nodejs"`
	WithYarn    bool        `json:"with_yarn" toml:"with_yarn"`
	WithDocker  bool        `json:"with_docker" toml:"with_docker"`
	WithGrifts  bool        `json:"with_grifts" toml:"with_grifts"`
	AsWeb       bool        `json:"as_web" toml:"as_web"`
	AsAPI       bool        `json:"as_api" toml:"as_api"`
	InApp       bool        `json:"in_app" toml:"-"`
	PackageJSON PackageJSON `json:"-" toml:"-"`
}

App represents meta data for a Buffalo application on disk.

func Named

func Named(name string, root string) App

Named gathers app data using the given name and root path.

func New

func New(root string) App

New gathers app data using the given root path. The app name is guessed from the root path.

func (App) BuildTags

func (a App) BuildTags(env string, tags ...string) BuildTags

BuildTags combines the passed in env, and any additional tags, with tags that Buffalo decides the build process requires. An example would be adding the "sqlite" build tag if using SQLite3.

func (*App) Decode

func (a *App) Decode(r io.Reader) error

Decode the list of plugins, in TOML format, from the reader

func (App) Encode

func (a App) Encode(w io.Writer) error

Encode the list of plugins, in TOML format, to the reader

func (App) IsZero

func (a App) IsZero() bool

IsZero checks if the App struct has no set field.

func (App) NodeScript

func (a App) NodeScript(name string) (string, error)

NodeScript gets the "scripts" section from package.json and returns the matching script if it exists.

func (*App) PackageRoot

func (a *App) PackageRoot(pp string)

PackageRoot sets the root package of the application and recalculates package related values

func (App) String

func (a App) String() string

type BuildTags

type BuildTags []string

BuildTags are tags used for building apps

func (BuildTags) String

func (t BuildTags) String() string

String returns the tags in the form of: "foo bar baz" (with the quotes!)

type PackageJSON

type PackageJSON struct {
	Scripts map[string]string `json:"scripts"`
}

PackageJSON stores package.json meta data used by Buffalo.

Source Files

app.go meta.go tags.go version.go

Version
v0.3.3 (latest)
Published
Sep 4, 2022
Platform
linux/amd64
Imports
15 packages
Last checked
3 weeks ago

Tools for package owners.