Unbind plugin parameter in badges
This commit is contained in:
parent
4ffe092e6f
commit
315101978b
@ -25,18 +25,18 @@ Add AppVeyor to a template's plugins to add AppVeyor CI support.
|
||||
end
|
||||
|
||||
"""
|
||||
badges(plugin::AppVeyor, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||
badges(\_::AppVeyor, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||
|
||||
Generate Markdown badges for the current package.
|
||||
|
||||
# Arguments
|
||||
* `plugin::AppVeyor`: Plugin whose badges we are generating.
|
||||
* `_::AppVeyor`: Plugin whose badges we are generating.
|
||||
* `t::Template`: Template configuration options.
|
||||
* `pkg_name::AbstractString`: Name of the package.
|
||||
|
||||
Returns an array of Markdown badges.
|
||||
"""
|
||||
function badges(plugin::AppVeyor, t::Template, pkg_name::AbstractString)
|
||||
function badges(_::AppVeyor, t::Template, pkg_name::AbstractString)
|
||||
user = strip(URI(t.remote_prefix).path, '/')
|
||||
return [
|
||||
"[](https://ci.appveyor.com/project/$user/$pkg_name-jl)"
|
||||
|
@ -9,9 +9,9 @@ Add CodeCov to a template's plugins to enable CodeCov coverage reports.
|
||||
"""
|
||||
@auto_hash_equals struct CodeCov <: Plugin
|
||||
gitignore_files::Vector{AbstractString}
|
||||
config_file::AbstractString
|
||||
config_file::Union{AbstractString, Void}
|
||||
|
||||
function CodeCov(; config_file::AbstractString="")
|
||||
function CodeCov(; config_file::Union{AbstractString, Void}="")
|
||||
if config_file != nothing
|
||||
if isempty(config_file)
|
||||
config_file = joinpath(DEFAULTS_DIR, "codecov.yml")
|
||||
@ -25,18 +25,18 @@ Add CodeCov to a template's plugins to enable CodeCov coverage reports.
|
||||
end
|
||||
|
||||
"""
|
||||
badges(plugin::CodeCov, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||
badges(\_::CodeCov, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||
|
||||
Generate Markdown badges for the current package.
|
||||
|
||||
# Arguments
|
||||
* `plugin::CodeCov`: plugin whose badges we are generating.
|
||||
* `_::CodeCov`: plugin whose badges we are generating.
|
||||
* `t::Template`: Template configuration options.
|
||||
* `pkg_name::AbstractString`: Name of the package.
|
||||
|
||||
Returns an array of Markdown badges.
|
||||
"""
|
||||
function badges(plugin::CodeCov, t::Template, pkg_name::AbstractString)
|
||||
function badges(_::CodeCov, t::Template, pkg_name::AbstractString)
|
||||
user = strip(URI(t.remote_prefix).path, '/')
|
||||
return [
|
||||
"[](https://codecov.io/gh/$user/$pkg_name.jl)"
|
||||
|
@ -22,18 +22,18 @@ Add GitHubPages to a template's plugins to add Documenter.jl support via GitHub
|
||||
end
|
||||
|
||||
"""
|
||||
badges(plugin::GitHubPages, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||
badges(\_::GitHubPages, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||
|
||||
Generate Markdown badges for the current package.
|
||||
|
||||
# Arguments
|
||||
* `plugin::GitHubPages`: plugin whose badges we are generating.
|
||||
* `_::GitHubPages`: plugin whose badges we are generating.
|
||||
* `t::Template`: Template configuration options.
|
||||
* `pkg_name::AbstractString`: Name of the package.
|
||||
|
||||
Returns an array of Markdown badges.
|
||||
"""
|
||||
function badges(plugin::GitHubPages, t::Template, pkg_name::AbstractString)
|
||||
function badges(_::GitHubPages, t::Template, pkg_name::AbstractString)
|
||||
if haskey(t.plugins, TravisCI)
|
||||
user = strip(URI(t.remote_prefix).path, '/')
|
||||
return [
|
||||
|
@ -25,18 +25,18 @@ Add TravisCI to a template's plugins to add Travis CI support.
|
||||
end
|
||||
|
||||
"""
|
||||
badges(plugin::TravisCI, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||
badges(\_::TravisCI, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||
|
||||
Generate Markdown badges for the current package.
|
||||
|
||||
# Arguments
|
||||
* `plugin::TravisCI`: plugin whose badges we are generating.
|
||||
* `_::TravisCI`: plugin whose badges we are generating.
|
||||
* `t::Template`: Template configuration and plugins.
|
||||
* `pkg_name::AbstractString`: Name of the package.
|
||||
|
||||
Returns an array of Markdown badges.
|
||||
"""
|
||||
function badges(plugin::TravisCI, t::Template, pkg_name::AbstractString)
|
||||
function badges(_::TravisCI, t::Template, pkg_name::AbstractString)
|
||||
user = strip(URI(t.remote_prefix).path, '/')
|
||||
return [
|
||||
"[](https://travis-ci.org/$user/$pkg_name.jl)"
|
||||
|
Loading…
Reference in New Issue
Block a user