Documentation ¶
Index ¶
- func CompileJavascriptFile(scriptPath string) (string, string, error)
- func DirExists(path string) bool
- func FileExists(path string) bool
- func GetCompileCacheDir(searchFrom string) string
- func SearchModuleInNodeModules(modName string, callerDir string) string
- func SearchNodeModulesDir(searchFrom string) string
- func SetJavascriptModuleResolver(handler JavascriptModuleResolverF)
- func WalkNodeModules(startDir string, handler func(dirPath string) bool)
- type JavascriptModuleResolverF
- type ScriptCompilationError
- type TransformedScript
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
func GetCompileCacheDir ¶
func SearchModuleInNodeModules ¶
SearchModuleInNodeModules returns the module path inside node_modules directory. It recurse in the upper directory if not found in the current one.
func SearchNodeModulesDir ¶
func SetJavascriptModuleResolver ¶
func SetJavascriptModuleResolver(handler JavascriptModuleResolverF)
func WalkNodeModules ¶
WalkNodeModules allows a function to be called on each node_modules dir until this function return true, going up recursively on the node_modules in the parent dir.
Types ¶
type ScriptCompilationError ¶
type ScriptCompilationError struct {
// contains filtered or unexported fields
}
func (*ScriptCompilationError) Error ¶
func (m *ScriptCompilationError) Error() string
Click to show internal directories.
Click to hide internal directories.