Documentation
¶
Overview ¶
Package mageutil provides utility functions for building AK
Index ¶
- func BuildTypeScript(baseDir, srcDir, destDir string) error
- func CopyFiles(paths map[string]string) error
- func CopyInDir(destDir, srcDir string, files ...string) error
- func CopyRecursively(destDir, srcDir string) error
- func DirGlob(dir, glob string) ([]string, error)
- func GoProto(dest, src, out, include, opt string) error
- func GoProtosInDir(dir, include, opt string) error
- func HasExec(cmds ...string) error
- func HasFiles(files ...string) error
- func Mkdir(path string) error
- func Newer(paths map[string]string) (bool, error)
- func SyncDirBasic(srcDir, destDir string) error
- func TSProtosInDir(destDir, srcDir, node_modules_dir string) error
- func TinyGoProto(dstPath string, srcPath string, includeDir string) error
- func TinyGoWASM(srcDir, outfile string) error
- func VerboseF(tmpl string, args ...any)
- func ZipDir(inPath, outPath string) error
- func ZipFiles(out string, files map[string]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTypeScript ¶
BuildTypeScript builds all .ts files in srcDir to .js files in destDir, as needed
func CopyRecursively ¶
CopyRecursively recursively copies srcDir to destDir
func DirGlob ¶
DirGlob performs a glob operation on dir. The returned matches do not have dir as a prefix.
func GoProtosInDir ¶
GoProtosInDir calls GoProto on all .proto files in dir
func Newer ¶
Newer considers paths as a map of file path keys to file path values. It returns true if any key path is newer than its corresponding value path.
func SyncDirBasic ¶ added in v0.0.18
SyncDirBasic sync the contents of srcDir to destDir, creating destDir as needed. When a file or directory exists in destDir but not srcDir it is deleted from srcDir. If the size of a file from source matches the size of the corresponding file in dest and the mod time of the dest file is the same or newer than the src file, the file is not copied. SyncDirBasic handles only files and directories, doesn't set timestamps or file permissions
func TSProtosInDir ¶
TSProtosInDir creates _pb.js files in destDir for all .proto files in srcDir
func TinyGoProto ¶ added in v0.0.16
func TinyGoWASM ¶ added in v0.0.18
Types ¶
This section is empty.