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

package meta

import "github.com/gobuffalo/meta"

Index

Package Files

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

Constants

const Version = "v0.0.1"
func ResolveSymlinks(p string) string

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

type App Uses

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 Uses

func Named(name string, root string) App

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

func New Uses

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 Uses

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 Uses

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

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

func (App) Encode Uses

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

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

func (App) IsZero Uses

func (a App) IsZero() bool

IsZero checks if the App struct has no set field.

func (App) NodeScript Uses

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 Uses

func (a *App) PackageRoot(pp string)

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

func (App) String Uses

func (a App) String() string

type BuildTags Uses

type BuildTags []string

BuildTags are tags used for building apps

func (BuildTags) String Uses

func (t BuildTags) String() string

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

type PackageJSON Uses

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

PackageJSON stores package.json meta data used by Buffalo.

Package meta imports 16 packages (graph) and is imported by 33 packages. Updated 2019-04-02. Refresh now. Tools for package owners.