Only Pkg.add("Documenter") if necessary (big speedup!)

This commit is contained in:
Chris de Graaf 2017-08-14 17:58:11 -05:00
parent 3410fbb406
commit 5dc80dddc5

View File

@ -15,8 +15,10 @@ Generate the "docs" directory with files common to all Documenter subtypes.
* `pkg_name::AbstractString`: Name of the package.
"""
function gen_plugin(plugin::Documenter, template::Template, pkg_name::AbstractString)
if Pkg.installed("Documenter") == nothing
info("Adding Documenter.jl")
Pkg.add("Documenter")
end
path = joinpath(template.path, pkg_name)
docs_dir = joinpath(path, "docs", "src")
mkpath(docs_dir)