package meta
import "github.com/gobuffalo/meta"
Index ¶
- Constants
- func ResolveSymlinks(p string) string
- type App
- func Named(name string, root string) App
- func New(root string) App
- func (a App) BuildTags(env string, tags ...string) BuildTags
- func (a *App) Decode(r io.Reader) error
- func (a App) Encode(w io.Writer) error
- func (a App) IsZero() bool
- func (a App) NodeScript(name string) (string, error)
- func (a *App) PackageRoot(pp string)
- func (a App) String() string
- type BuildTags
- type PackageJSON
Constants ¶
const Version = "v0.3.3"
Functions ¶
func ResolveSymlinks ¶
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 ¶
Named gathers app data using the given name and root path.
func New ¶
New gathers app data using the given root path. The app name is guessed from the root path.
func (App) 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 ¶
Decode the list of plugins, in TOML format, from the reader
func (App) Encode ¶
Encode the list of plugins, in TOML format, to the reader
func (App) IsZero ¶
IsZero checks if the App struct has no set field.
func (App) NodeScript ¶
NodeScript gets the "scripts" section from package.json and returns the matching script if it exists.
func (*App) PackageRoot ¶
PackageRoot sets the root package of the application and recalculates package related values
func (App) String ¶
type BuildTags ¶
type BuildTags []string
BuildTags are tags used for building apps
func (BuildTags) String ¶
String returns the tags in the form of: "foo bar baz" (with the quotes!)
type PackageJSON ¶
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.