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 IsURL(s 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 SyncPackages(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 BASE_DIR = ".local/share/wtsuite/"
View Source
const (
JSFILE_EXT = ".wts"
)
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 LATEST bool = false
View Source
var StartCacheUpdate func(fname string) = nil
Functions ¶
func Abbreviate ¶
func AssertFile ¶
func PkgInstallDst ¶
func ResolvePackages ¶
func SyncPackages ¶ added in v0.2.0
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 NewSemVerRange ¶ added in v0.2.0
func NewSemVerRange(min *SemVer, max *SemVer) *SemVerRange
func (*SemVerRange) Contains ¶ added in v0.2.0
func (sr *SemVerRange) Contains(semVer *SemVer) bool
func (*SemVerRange) FindBestVersion ¶
func (sr *SemVerRange) FindBestVersion(dir string) (string, error)
func (*SemVerRange) Max ¶ added in v0.2.0
func (sr *SemVerRange) Max() *SemVer
func (*SemVerRange) Min ¶ added in v0.2.0
func (sr *SemVerRange) Min() *SemVer
Click to show internal directories.
Click to hide internal directories.