Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultIgnoredFolders = []string{".", "_", "vendor", "node_modules", "_fixtures"}
Functions ¶
func FromArgs ¶
FromArgs is useful when writing packr store-cmd binaries.
package main import ( "log" "os" "github.com/768bit/packr/v2/jam/parser" "github.com/markbates/s3packr/s3packr" ) func main() { err := parser.FromArgs(os.Args[1:], func(boxes parser.Boxes) error { for _, box := range boxes { s3 := s3packr.New(box) if err := s3.Pack(box); err != nil { return err } } return nil }) if err != nil { log.Fatal(err) } }
func IsProspect ¶
Types ¶
type Box ¶
type Box struct { Name string // name of the box Path string // relative path of folder NewBox("./templates") AbsPath string // absolute path of Path Package string // the package name the box was found in PWD string // the PWD when the parser was run PackageDir string // the absolute path of the package where the box was found }
Box found while parsing a file
type File ¶
File that is to be parsed
type Parser ¶
Parser to find boxes
func NewFromRoots ¶
func NewFromRoots(roots []string, opts *RootsOptions) (*Parser, error)
NewFromRoots scans the file roots provided and returns a new Parser containing the prospects
type RootsOptions ¶
func (RootsOptions) String ¶
func (r RootsOptions) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.