Documentation
¶
Index ¶
- Constants
- Variables
- func Abbreviate(path string) string
- func AssertDir(dname string) error
- func AssertFile(fname string) error
- func IsDir(dname string) bool
- func IsFile(fname string) bool
- func PkgInstallDst(url string) string
- func ResolvePackages(startFile string) error
- func Search(callerPath string, srcPath string) (string, error)
- func SearchPackage(caller string, pkgPath string, lang Lang) (string, error)
- func SearchScript(caller string, path string) (string, error)
- func SearchShader(caller string, path string) (string, error)
- func SearchTemplate(caller string, path string) (string, error)
- func SyncPackage(startFile string, fetcher FetchFunc) error
- func WalkFiles(dir string, ext string, fn func(string) error) error
- func WriteFile(path string, target string, content []byte) error
- type DependencyConfig
- type FetchFunc
- type Lang
- type Package
- type PackageConfig
- type PathLang
- type SemVer
- type SemVerRange
Constants ¶
View Source
const ( SCRIPT Lang = "script" TEMPLATE = "template" SHADER = "shader" )
View Source
const ( UIFILE_EXT = ".wtt" JSFILE_EXT = ".wts" UIPACKAGE_SUFFIX = "__init__" + UIFILE_EXT JSPACKAGE_SUFFIX = "__init__" + JSFILE_EXT )
View Source
const BASE_DIR = ".local/share/wtsuite/"
View Source
const PACKAGE_JSON = "package.json"
View Source
const USER_ENV_KEY = "WTPATH"
Variables ¶
View Source
var ( JS_MODE = false VERBOSITY = 0 )
View Source
var AddCacheDependency func(fname string, dep string) = nil
View Source
var HasUpstreamCacheDependency func(thisPath string, upstreamPath string) bool = nil
View Source
var StartCacheUpdate func(fname string) = nil
Functions ¶
func Abbreviate ¶
func AssertFile ¶
func PkgInstallDst ¶
func ResolvePackages ¶
func SyncPackage ¶
Types ¶
type DependencyConfig ¶
type FetchFunc ¶
type FetchFunc func(url string, svr *SemVerRange) error
type PackageConfig ¶
type PackageConfig struct { Dependencies map[string]DependencyConfig `json:"dependencies"` TemplateModules map[string]string `json:"templateModules"` ScriptModules map[string]string `json:"scriptModules"` ShaderModules map[string]string `json:"shaderModules"` }
func NewEmptyPackageConfig ¶
func NewEmptyPackageConfig() *PackageConfig
type SemVerRange ¶
type SemVerRange struct {
// contains filtered or unexported fields
}
func (*SemVerRange) FindBestVersion ¶
func (sr *SemVerRange) FindBestVersion(dir string) (string, error)
Click to show internal directories.
Click to hide internal directories.