diff --git a/Project.toml b/Project.toml index b690c06..0808ba6 100644 --- a/Project.toml +++ b/Project.toml @@ -5,21 +5,23 @@ version = "0.8.1" [deps] FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f" -Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" -URIParser = "30578b45-9adc-5946-b283-645ec420af67" +Requires = "ae029012-a4dd-5104-9daa-d747884805df" [compat] FilePathsBase = "0.9" Glob = "1" MacroTools = "0.5" -Reexport = "0.2" +Reexport = "1" +Requires = "1" URIParser = "0.4" julia = "1" [extras] +Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +URIParser = "30578b45-9adc-5946-b283-645ec420af67" [targets] -test = ["Test"] +test = ["Glob", "Test", "URIParser"] diff --git a/src/FilePaths.jl b/src/FilePaths.jl index ba00dda..86c1fa6 100644 --- a/src/FilePaths.jl +++ b/src/FilePaths.jl @@ -1,13 +1,16 @@ -__precompile__() - module FilePaths -using Glob, MacroTools, Reexport, URIParser -using Glob: GlobMatch +using MacroTools +using Reexport +using Requires + @reexport using FilePathsBase include("compat.jl") -include("glob.jl") -include("uri.jl") + +function __init__() + @require Glob="c27321d9-0574-5035-807b-f59d2c89b15c" include("glob.jl") + @require URIParser="30578b45-9adc-5946-b283-645ec420af67" include("uri.jl") +end end # end of module diff --git a/src/glob.jl b/src/glob.jl index 9e681eb..a74134c 100644 --- a/src/glob.jl +++ b/src/glob.jl @@ -1,3 +1,6 @@ +using .Glob +using .Glob: GlobMatch + Base.readdir(pattern::GlobMatch, prefix::AbstractPath) = glob(pattern, prefix) function Glob.glob(pattern, prefix::T) where T<:AbstractPath diff --git a/src/uri.jl b/src/uri.jl index 40982ab..1ff03d3 100644 --- a/src/uri.jl +++ b/src/uri.jl @@ -1,3 +1,5 @@ +using .URIParser + function URIParser.URI(p::AbstractPath; query="", fragment="") if isempty(p.root) throw(ArgumentError("$p is not an absolute path"))