A few more deprecations
This commit is contained in:
parent
564a379c5e
commit
1385d6fa4b
@ -7,6 +7,7 @@ version = "0.1.0"
|
|||||||
AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f"
|
AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f"
|
||||||
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
|
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
|
||||||
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
|
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
|
||||||
|
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
|
||||||
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
|
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
|
||||||
Mustache = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70"
|
Mustache = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70"
|
||||||
TerminalMenus = "dc548174-15c3-5faf-af27-7997cfbde655"
|
TerminalMenus = "dc548174-15c3-5faf-af27-7997cfbde655"
|
||||||
|
@ -4,12 +4,12 @@ module PkgTemplates
|
|||||||
using AutoHashEquals
|
using AutoHashEquals
|
||||||
using Dates
|
using Dates
|
||||||
using Distributed
|
using Distributed
|
||||||
|
using InteractiveUtils
|
||||||
|
using LibGit2
|
||||||
using Mustache
|
using Mustache
|
||||||
using TerminalMenus
|
using TerminalMenus
|
||||||
using URIParser
|
using URIParser
|
||||||
|
|
||||||
import LibGit2
|
|
||||||
|
|
||||||
export
|
export
|
||||||
# Template/package generation.
|
# Template/package generation.
|
||||||
Template,
|
Template,
|
||||||
|
@ -276,7 +276,7 @@ function interactive_template(; fast::Bool=false)
|
|||||||
isempty(line) && break
|
isempty(line) && break
|
||||||
tokens = split(line, " ", limit=2)
|
tokens = split(line, " ", limit=2)
|
||||||
if haskey(gitconfig, tokens[1])
|
if haskey(gitconfig, tokens[1])
|
||||||
warn("Duplicate key '$(tokens[1])': Replacing old value '$(tokens[2])'")
|
@warn "Duplicate key '$(tokens[1])': Replacing old value '$(tokens[2])'"
|
||||||
end
|
end
|
||||||
gitconfig[tokens[1]] = tokens[2]
|
gitconfig[tokens[1]] = tokens[2]
|
||||||
end
|
end
|
||||||
@ -285,7 +285,7 @@ function interactive_template(; fast::Bool=false)
|
|||||||
|
|
||||||
println("Select plugins:")
|
println("Select plugins:")
|
||||||
# Only include plugin types which have an `interactive` method.
|
# Only include plugin types which have an `interactive` method.
|
||||||
plugin_types = filter(t -> method_exists(interactive, (Type{t},)), fetch(plugin_types))
|
plugin_types = filter(t -> hasmethod(interactive, (Type{t},)), fetch(plugin_types))
|
||||||
type_names = map(t -> split(string(t), ".")[end], plugin_types)
|
type_names = map(t -> split(string(t), ".")[end], plugin_types)
|
||||||
menu = MultiSelectMenu(String.(type_names); pagesize=length(type_names))
|
menu = MultiSelectMenu(String.(type_names); pagesize=length(type_names))
|
||||||
selected = collect(request(menu))
|
selected = collect(request(menu))
|
||||||
@ -301,4 +301,4 @@ end
|
|||||||
|
|
||||||
Get all concrete subtypes of `t`.
|
Get all concrete subtypes of `t`.
|
||||||
"""
|
"""
|
||||||
leaves(t::Type)::Vector{DataType} = isleaftype(t) ? [t] : vcat(leaves.(subtypes(t))...)
|
leaves(t::Type)::Vector{DataType} = isconcretetype(t) ? [t] : vcat(leaves.(subtypes(t))...)
|
||||||
|
Loading…
Reference in New Issue
Block a user