diff --git a/dev/index.html b/dev/index.html index f089302..cfbb434 100644 --- a/dev/index.html +++ b/dev/index.html @@ -51,9 +51,9 @@ Generating project MyPkg: [ Info: Committed 6 files/directories: src/, Project.toml, test/, README.md, LICENSE, .gitignore Resolving package versions... Updating `~/build/invenia/PkgTemplates.jl/docs/Project.toml` - [d0cd6650] + MyPkg v0.1.0 [`~/.julia/dev/MyPkg`] + [8557d362] + MyPkg v0.1.0 [`~/.julia/dev/MyPkg`] Updating `~/build/invenia/PkgTemplates.jl/docs/Manifest.toml` - [d0cd6650] + MyPkg v0.1.0 [`~/.julia/dev/MyPkg`] + [8557d362] + MyPkg v0.1.0 [`~/.julia/dev/MyPkg`] [ Info: New package is at /home/travis/.julia/dev/MyPkg julia> run(`git -C $(joinpath(t.dir, "MyPkg")) ls-files`); @@ -149,8 +149,8 @@ Generating project MyPkg2: [ Info: activating new environment at ~/build/invenia/PkgTemplates.jl/docs/Project.toml. Resolving package versions... Installed Parsers ──── v0.3.7 - Installed Documenter ─ v0.23.3 Installed JSON ─────── v0.21.0 + Installed Documenter ─ v0.23.3 Updating `~/code/MyPkg2/docs/Project.toml` [e30172f5] + Documenter v0.23.3 Updating `~/code/MyPkg2/docs/Manifest.toml` @@ -177,15 +177,15 @@ Generating project MyPkg2: [cf7118a7] + UUIDs [4ec0a83e] + Unicode [ Info: activating new environment at ~/build/invenia/PkgTemplates.jl/docs/Project.toml. -[ Info: Committed 10 files/directories: src/, Project.toml, test/, README.md, LICENSE, .travis.yml, docs/, .cirrus.yml, .appveyor.yml, .gitignore +[ Info: Committed 10 files/directories: src/, Project.toml, test/, README.md, LICENSE, docs/, .cirrus.yml, .appveyor.yml, .travis.yml, .gitignore [ Info: Remember to push all created branches to your remote: git push --all Resolving package versions... ┌ Warning: julia version requirement for package MyPkg2 not satisfied └ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:154 Updating `~/build/invenia/PkgTemplates.jl/docs/Project.toml` - [d3783bf0] + MyPkg2 v0.1.0 [`~/code/MyPkg2`] + [886399ce] + MyPkg2 v0.1.0 [`~/code/MyPkg2`] Updating `~/build/invenia/PkgTemplates.jl/docs/Manifest.toml` - [d3783bf0] + MyPkg2 v0.1.0 [`~/code/MyPkg2`] + [886399ce] + MyPkg2 v0.1.0 [`~/code/MyPkg2`] [ Info: New package is at /home/travis/code/MyPkg2 julia> run(`git -C $(joinpath(t.dir, "MyPkg2")) ls-files`); diff --git a/dev/pages/licenses/index.html b/dev/pages/licenses/index.html index ab41406..f5110e2 100644 --- a/dev/pages/licenses/index.html +++ b/dev/pages/licenses/index.html @@ -1,2 +1,2 @@ -Licenses · PkgTemplates.jl

Licenses

Licenses

Many open-source licenses are available for use with PkgTemplates, but if you see that one is missing, don't hesitate to open an issue or PR.

available_licenses([io::IO]) -> Nothing

Print the names of all available licenses.

source
show_license([io::IO], license::AbstractString) -> Nothing

Print the text of license. Errors if the license is not found.

source

Helper Functions

read_license(license::AbstractString) -> String

Returns the contents of license. Errors if the license is not found. Use available_licenses to view available licenses.

source
+Licenses · PkgTemplates.jl

Licenses

Licenses

Many open-source licenses are available for use with PkgTemplates, but if you see that one is missing, don't hesitate to open an issue or PR.

available_licenses([io::IO]) -> Nothing

Print the names of all available licenses.

source
show_license([io::IO], license::AbstractString) -> Nothing

Print the text of license. Errors if the license is not found.

source

Helper Functions

read_license(license::AbstractString) -> String

Returns the contents of license. Errors if the license is not found. Use available_licenses to view available licenses.

source
diff --git a/dev/pages/package_generation/index.html b/dev/pages/package_generation/index.html index 6534e2d..ee62a22 100644 --- a/dev/pages/package_generation/index.html +++ b/dev/pages/package_generation/index.html @@ -1,3 +1,3 @@ -Package Generation · PkgTemplates.jl

Package Generation

Package Generation

Creating new packages with PkgTemplates revolves around creating a new Template, then calling generate on it.

Template

Template(; kwargs...) -> Template

Records common information used to generate a package. If you don't wish to manually create a template, you can use interactive_template instead.

Keyword Arguments

  • user::AbstractString="": GitHub (or other code hosting service) username. If left unset, it will take the the global git config's value (github.user). If that is not set, an ArgumentError is thrown. This is case-sensitive for some plugins, so take care to enter it correctly.
  • host::AbstractString="github.com": URL to the code hosting service where your package will reside. Note that while hosts other than GitHub won't cause errors, they are not officially supported and they will cause certain plugins will produce incorrect output.
  • license::AbstractString="MIT": Name of the package license. If an empty string is given, no license is created. available_licenses can be used to list all available licenses, and show_license can be used to print out a particular license's text.
  • authors::Union{AbstractString, Vector{<:AbstractString}}="": Names that appear on the license. Supply a string for one author or an array for multiple. Similarly to user, it will take the value of of the global git config's value if it is left unset.
  • dir::AbstractString=~/.julia/dev: Directory in which the package will go. Relative paths are converted to absolute ones at template creation time.
  • julia_version::VersionNumber=1.0.0: Minimum allowed Julia version.
  • ssh::Bool=false: Whether or not to use SSH for the git remote. If false HTTPS will be used.
  • dev::Bool=true: Whether or not to Pkg.develop generated packages.
  • manifest::Bool=false: Whether or not to commit the Manifest.toml.
  • plugins::Vector{<:Plugin}=Plugin[]: A list of Plugins that the package will include.
source
interactive_template(; fast::Bool=false) -> Template

Interactively create a Template. If fast is set, defaults will be assumed for all values except username and plugins.

source

generate

PkgTemplates.generateFunction.
generate(pkg::AbstractString, t::Template) -> Nothing
-generate(t::Template, pkg::AbstractString) -> Nothing

Generate a package named pkg from t. If git is false, no Git repository is created.

source
generate_interactive(pkg::AbstractString; fast::Bool=false, git::Bool=true) -> Template

Interactively create a template, and then generate a package with it. Arguments and keywords are used in the same way as in generate and interactive_template.

source

Helper Functions

gen_tests(pkg_dir::AbstractString, t::Template) -> Vector{String}

Create the test entrypoint in pkg_dir.

Arguments

  • pkg_dir::AbstractString: The package directory in which the files will be generated
  • t::Template: The template whose tests we are generating.

Returns an array of generated file/directory names.

source
gen_readme(pkg_dir::AbstractString, t::Template) -> Vector{String}

Create a README in pkg_dir with badges for each enabled plugin.

Arguments

  • pkg_dir::AbstractString: The directory in which the files will be generated.
  • t::Template: The template whose README we are generating.

Returns an array of generated file/directory names.

source
gen_gitignore(pkg_dir::AbstractString, t::Template) -> Vector{String}

Create a .gitignore in pkg_dir.

Arguments

  • pkg_dir::AbstractString: The directory in which the files will be generated.
  • t::Template: The template whose .gitignore we are generating.

Returns an array of generated file/directory names.

source
gen_license(pkg_dir::AbstractString, t::Template) -> Vector{String}

Create a license in pkg_dir.

Arguments

  • pkg_dir::AbstractString: The directory in which the files will be generated.
  • t::Template: The template whose LICENSE we are generating.

Returns an array of generated file/directory names.

source
+Package Generation · PkgTemplates.jl

Package Generation

Package Generation

Creating new packages with PkgTemplates revolves around creating a new Template, then calling generate on it.

Template

Template(; kwargs...) -> Template

Records common information used to generate a package. If you don't wish to manually create a template, you can use interactive_template instead.

Keyword Arguments

  • user::AbstractString="": GitHub (or other code hosting service) username. If left unset, it will take the the global git config's value (github.user). If that is not set, an ArgumentError is thrown. This is case-sensitive for some plugins, so take care to enter it correctly.
  • host::AbstractString="github.com": URL to the code hosting service where your package will reside. Note that while hosts other than GitHub won't cause errors, they are not officially supported and they will cause certain plugins will produce incorrect output.
  • license::AbstractString="MIT": Name of the package license. If an empty string is given, no license is created. available_licenses can be used to list all available licenses, and show_license can be used to print out a particular license's text.
  • authors::Union{AbstractString, Vector{<:AbstractString}}="": Names that appear on the license. Supply a string for one author or an array for multiple. Similarly to user, it will take the value of of the global git config's value if it is left unset.
  • dir::AbstractString=~/.julia/dev: Directory in which the package will go. Relative paths are converted to absolute ones at template creation time.
  • julia_version::VersionNumber=1.0.0: Minimum allowed Julia version.
  • ssh::Bool=false: Whether or not to use SSH for the git remote. If false HTTPS will be used.
  • dev::Bool=true: Whether or not to Pkg.develop generated packages.
  • manifest::Bool=false: Whether or not to commit the Manifest.toml.
  • plugins::Vector{<:Plugin}=Plugin[]: A list of Plugins that the package will include.
source
interactive_template(; fast::Bool=false) -> Template

Interactively create a Template. If fast is set, defaults will be assumed for all values except username and plugins.

source

generate

PkgTemplates.generateFunction.
generate(pkg::AbstractString, t::Template) -> Nothing
+generate(t::Template, pkg::AbstractString) -> Nothing

Generate a package named pkg from t. If git is false, no Git repository is created.

source
generate_interactive(pkg::AbstractString; fast::Bool=false, git::Bool=true) -> Template

Interactively create a template, and then generate a package with it. Arguments and keywords are used in the same way as in generate and interactive_template.

source

Helper Functions

gen_tests(pkg_dir::AbstractString, t::Template) -> Vector{String}

Create the test entrypoint in pkg_dir.

Arguments

  • pkg_dir::AbstractString: The package directory in which the files will be generated
  • t::Template: The template whose tests we are generating.

Returns an array of generated file/directory names.

source
gen_readme(pkg_dir::AbstractString, t::Template) -> Vector{String}

Create a README in pkg_dir with badges for each enabled plugin.

Arguments

  • pkg_dir::AbstractString: The directory in which the files will be generated.
  • t::Template: The template whose README we are generating.

Returns an array of generated file/directory names.

source
gen_gitignore(pkg_dir::AbstractString, t::Template) -> Vector{String}

Create a .gitignore in pkg_dir.

Arguments

  • pkg_dir::AbstractString: The directory in which the files will be generated.
  • t::Template: The template whose .gitignore we are generating.

Returns an array of generated file/directory names.

source
gen_license(pkg_dir::AbstractString, t::Template) -> Vector{String}

Create a license in pkg_dir.

Arguments

  • pkg_dir::AbstractString: The directory in which the files will be generated.
  • t::Template: The template whose LICENSE we are generating.

Returns an array of generated file/directory names.

source
diff --git a/dev/pages/plugin_development/index.html b/dev/pages/plugin_development/index.html index ff6effd..f673583 100644 --- a/dev/pages/plugin_development/index.html +++ b/dev/pages/plugin_development/index.html @@ -1,5 +1,5 @@ -Plugin Development · PkgTemplates.jl

Plugin Development

Plugin Development

The best and easiest way to contribute to PkgTemplates is to write new plugins.

A plugin to be added to a Template, which adds some functionality or integration. New plugins should almost always extend GenericPlugin or CustomPlugin.

source

Generic Plugins

Generic plugins are plugins that add any number of patterns to the generated package's .gitignore, and have at most one associated file to generate.

Attributes

  • gitignore::Vector{AbstractString}: Array of patterns to be added to the .gitignore of generated packages that use this plugin.
  • src::Union{AbstractString, Nothing}: Path to the file that will be copied into the generated package repository. If set to nothing, no file will be generated. When this defaults to an empty string, there should be a default file in defaults that will be copied. That file's name is usually the same as the plugin's name, except in all lowercase and with the .yml extension. If this is not the case, an interactive method needs to be implemented to call interactive(; file="file.ext").
  • dest::AbstractString: Path to the generated file, relative to the root of the generated package repository.
  • badges::Vector{Badge}: Array of Badges containing information used to create Markdown-formatted badges from the plugin. Entries will be run through substitute, so they may contain placeholder values.
  • view::Dict{String, Any}: Additional substitutions to make in both the plugin's badges and its associated file. See substitute for details.

Example

struct MyPlugin <: GenericPlugin
+Plugin Development · PkgTemplates.jl

Plugin Development

Plugin Development

The best and easiest way to contribute to PkgTemplates is to write new plugins.

A plugin to be added to a Template, which adds some functionality or integration. New plugins should almost always extend GenericPlugin or CustomPlugin.

source

Generic Plugins

Generic plugins are plugins that add any number of patterns to the generated package's .gitignore, and have at most one associated file to generate.

Attributes

  • gitignore::Vector{AbstractString}: Array of patterns to be added to the .gitignore of generated packages that use this plugin.
  • src::Union{AbstractString, Nothing}: Path to the file that will be copied into the generated package repository. If set to nothing, no file will be generated. When this defaults to an empty string, there should be a default file in defaults that will be copied. That file's name is usually the same as the plugin's name, except in all lowercase and with the .yml extension. If this is not the case, an interactive method needs to be implemented to call interactive(; file="file.ext").
  • dest::AbstractString: Path to the generated file, relative to the root of the generated package repository.
  • badges::Vector{Badge}: Array of Badges containing information used to create Markdown-formatted badges from the plugin. Entries will be run through substitute, so they may contain placeholder values.
  • view::Dict{String, Any}: Additional substitutions to make in both the plugin's badges and its associated file. See substitute for details.

Example

struct MyPlugin <: GenericPlugin
     gitignore::Vector{AbstractString}
     src::Union{AbstractString, Nothing}
     dest::AbstractString
@@ -34,7 +34,7 @@
     end
 end
 
-interactive(::Type{MyPlugin}) = interactive(MyPlugin; file="my-plugin.toml")

The above plugin ignores files ending with .mgp, copies defaults/my-plugin.toml by default, and creates a badge that links to the project on its own site, using the default substitutions with one addition: {{YEAR}} => year(today()). Since the default config template file doesn't follow the generic naming convention, we added another interactive method to correct the assumed filename.

source

Custom Plugins

Custom plugins are plugins whose behaviour does not follow the GenericPlugin pattern. They can implement gen_plugin, badges, and interactive in any way they choose, as long as they conform to the usual type signature.

Attributes

  • gitignore::Vector{AbstractString}: Array of patterns to be added to the .gitignore of generated packages that use this plugin.

Example

struct MyPlugin <: CustomPlugin
+interactive(::Type{MyPlugin}) = interactive(MyPlugin; file="my-plugin.toml")

The above plugin ignores files ending with .mgp, copies defaults/my-plugin.toml by default, and creates a badge that links to the project on its own site, using the default substitutions with one addition: {{YEAR}} => year(today()). Since the default config template file doesn't follow the generic naming convention, we added another interactive method to correct the assumed filename.

source

Custom Plugins

Custom plugins are plugins whose behaviour does not follow the GenericPlugin pattern. They can implement gen_plugin, badges, and interactive in any way they choose, as long as they conform to the usual type signature.

Attributes

  • gitignore::Vector{AbstractString}: Array of patterns to be added to the .gitignore of generated packages that use this plugin.

Example

struct MyPlugin <: CustomPlugin
     gitignore::Vector{AbstractString}
     lucky::Bool
 
@@ -66,9 +66,9 @@ interactive(::Type{MyPlugin}) = interactive(MyPlugin; file="my-plugin.toml&
     end
 end
 
-interactive(:Type{MyPlugin}) = MyPlugin()

This plugin doesn't do much, but it demonstrates how gen_plugin, badges and interactive can be implemented using substitute, gen_file, Badge, and format.

Defining Template Files

Often, the contents of the config file that your plugin generates depends on variables like the package name, the user's username, etc. Template files (which are stored in defaults) can use here's syntax to define replacements.

source

CustomPlugin Required Methods

gen_plugin

gen_plugin(p::Plugin, t::Template, pkg_name::AbstractString) -> Vector{String}

Generate any files associated with a plugin.

Arguments

  • p::Plugin: Plugin whose files are being generated.
  • t::Template: Template configuration.
  • pkg_name::AbstractString: Name of the package.

Returns an array of generated file/directory names.

source
interactive(T::Type{<:Plugin}; file::Union{AbstractString, Nothing}="") -> Plugin

Interactively create a plugin of type T, where file is the plugin type's default config template with a non-standard name (for MyPlugin, this is anything but "myplugin.yml").

source

Note: interactive is not strictly required, however without it, your custom plugin will not be available when creating templates with interactive_template.

badges

PkgTemplates.badgesFunction.
badges(p::Plugin, user::AbstractString, pkg_name::AbstractString) -> Vector{String}

Generate Markdown badges for the plugin.

Arguments

  • p::Plugin: Plugin whose badges we are generating.
  • user::AbstractString: Username of the package creator.
  • pkg_name::AbstractString: Name of the package.

Returns an array of Markdown badges.

source

Helper Types/Functions

gen_file

PkgTemplates.gen_fileFunction.
gen_file(file::AbstractString, text::AbstractString) -> Int

Create a new file containing some given text. Always ends the file with a newline.

Arguments

  • file::AbstractString: Path to the file to be created.
  • text::AbstractString: Text to write to the file.

Returns the number of bytes written to the file.

source

substitute

substitute(template::AbstractString, view::Dict{String, Any}) -> String
+interactive(:Type{MyPlugin}) = MyPlugin()

This plugin doesn't do much, but it demonstrates how gen_plugin, badges and interactive can be implemented using substitute, gen_file, Badge, and format.

Defining Template Files

Often, the contents of the config file that your plugin generates depends on variables like the package name, the user's username, etc. Template files (which are stored in defaults) can use here's syntax to define replacements.

source

CustomPlugin Required Methods

gen_plugin

gen_plugin(p::Plugin, t::Template, pkg_name::AbstractString) -> Vector{String}

Generate any files associated with a plugin.

Arguments

  • p::Plugin: Plugin whose files are being generated.
  • t::Template: Template configuration.
  • pkg_name::AbstractString: Name of the package.

Returns an array of generated file/directory names.

source
interactive(T::Type{<:Plugin}; file::Union{AbstractString, Nothing}="") -> Plugin

Interactively create a plugin of type T, where file is the plugin type's default config template with a non-standard name (for MyPlugin, this is anything but "myplugin.yml").

source

Note: interactive is not strictly required, however without it, your custom plugin will not be available when creating templates with interactive_template.

badges

PkgTemplates.badgesFunction.
badges(p::Plugin, user::AbstractString, pkg_name::AbstractString) -> Vector{String}

Generate Markdown badges for the plugin.

Arguments

  • p::Plugin: Plugin whose badges we are generating.
  • user::AbstractString: Username of the package creator.
  • pkg_name::AbstractString: Name of the package.

Returns an array of Markdown badges.

source

Helper Types/Functions

gen_file

PkgTemplates.gen_fileFunction.
gen_file(file::AbstractString, text::AbstractString) -> Int

Create a new file containing some given text. Always ends the file with a newline.

Arguments

  • file::AbstractString: Path to the file to be created.
  • text::AbstractString: Text to write to the file.

Returns the number of bytes written to the file.

source

substitute

substitute(template::AbstractString, view::Dict{String, Any}) -> String
 substitute(
     template::AbstractString,
     pkg_template::Template;
     view::Dict{String, Any}=Dict{String, Any}(),
-) -> String

Replace placeholders in template with values in view via Mustache. template is not modified. If pkg_template is supplied, some default replacements are also performed.

For information on how to structure template, see "Defining Template Files" section in Custom Plugins.

Note: Conditionals in template without a corresponding key in view won't error, but will simply be evaluated as false.

source

Badge

Badge(hover::AbstractString, image::AbstractString, link::AbstractString) -> Badge

A Badge contains the data necessary to generate a Markdown badge.

Arguments

  • hover::AbstractString: Text to appear when the mouse is hovered over the badge.
  • image::AbstractString: URL to the image to display.
  • link::AbstractString: URL to go to upon clicking the badge.
source

format

PkgTemplates.formatFunction.
format(b::Badge) -> String

Return badge's data formatted as a Markdown string.

source

version_floor

version_floor(v::VersionNumber=VERSION) -> String

Format the given Julia version.

Keyword arguments

  • v::VersionNumber=VERSION: Version to floor.

Returns "major.minor" for the most recent release version relative to v. For prereleases with v.minor == v.patch == 0, returns "major.minor-".

source
+) -> String

Replace placeholders in template with values in view via Mustache. template is not modified. If pkg_template is supplied, some default replacements are also performed.

For information on how to structure template, see "Defining Template Files" section in Custom Plugins.

Note: Conditionals in template without a corresponding key in view won't error, but will simply be evaluated as false.

source

Badge

Badge(hover::AbstractString, image::AbstractString, link::AbstractString) -> Badge

A Badge contains the data necessary to generate a Markdown badge.

Arguments

  • hover::AbstractString: Text to appear when the mouse is hovered over the badge.
  • image::AbstractString: URL to the image to display.
  • link::AbstractString: URL to go to upon clicking the badge.
source

format

PkgTemplates.formatFunction.
format(b::Badge) -> String

Return badge's data formatted as a Markdown string.

source

version_floor

version_floor(v::VersionNumber=VERSION) -> String

Format the given Julia version.

Keyword arguments

  • v::VersionNumber=VERSION: Version to floor.

Returns "major.minor" for the most recent release version relative to v. For prereleases with v.minor == v.patch == 0, returns "major.minor-".

source
diff --git a/dev/pages/plugins/index.html b/dev/pages/plugins/index.html index ff5eacd..664d660 100644 --- a/dev/pages/plugins/index.html +++ b/dev/pages/plugins/index.html @@ -1,2 +1,2 @@ -Plugins · PkgTemplates.jl

Plugins

Plugins

Plugins are the secret sauce behind PkgTemplates's customization and extension. This page describes plugins that already exist; for information on writing your own plugins, see Plugin Development.

Continuous Integration (CI)

TravisCI(; config_file::Union{AbstractString, Nothing}="") -> TravisCI

Add TravisCI to a template's plugins to add a .travis.yml configuration file to generated repositories, and an appropriate badge to the README.

Keyword Arguments:

  • config_file::Union{AbstractString, Nothing}="": Path to a custom .travis.yml. If nothing is supplied, no file will be generated.
source
AppVeyor(; config_file::Union{AbstractString, Nothing}="") -> AppVeyor

Add AppVeyor to a template's plugins to add a .appveyor.yml configuration file to generated repositories, and an appropriate badge to the README.

Keyword Arguments

  • config_file::Union{AbstractString, Nothing}="": Path to a custom .appveyor.yml. If nothing is supplied, no file will be generated.
source
GitLabCI(; config_file::Union{AbstractString, Nothing}="", coverage::Bool=true) -> GitLabCI

Add GitLabCI to a template's plugins to add a .gitlab-ci.yml configuration file to generated repositories, and appropriate badge(s) to the README.

Keyword Arguments:

  • config_file::Union{AbstractString, Nothing}="": Path to a custom .gitlab-ci.yml. If nothing is supplied, no file will be generated.
  • coverage::Bool=true: Whether or not GitLab CI's built-in code coverage analysis should be enabled.
source
CirrusCI(; config_file::Union{AbstractString, Nothing}="") -> CirrusCI

Add CirrusCI to a template's plugins to add a .cirrus.yml configuration file to generated repositories, and an appropriate badge to the README. The default configuration file supports only FreeBSD builds via CirrusCI.jl

Keyword Arguments

  • config_file::Union{AbstractString, Nothing}="": Path to a custom .cirrus.yml. If nothing is supplied, no file will be generated.
source

Code Coverage

Codecov(; config_file::Union{AbstractString, Nothing}=nothing) -> Codecov

Add Codecov to a template's plugins to optionally add a .codecov.yml configuration file to generated repositories, and an appropriate badge to the README. Also updates the .gitignore accordingly.

Keyword Arguments:

  • config_file::Union{AbstractString, Nothing}=nothing: Path to a custom .codecov.yml. If left unset, no file will be generated.
source
Coveralls(; config_file::Union{AbstractString, Nothing}=nothing) -> Coveralls

Add Coveralls to a template's plugins to optionally add a .coveralls.yml configuration file to generated repositories, and an appropriate badge to the README. Also updates the .gitignore accordingly.

Keyword Arguments:

  • config_file::Union{AbstractString, Nothing}=nothing: Path to a custom .coveralls.yml. If left unset, no file will be generated.
source

Documentation

Add a Documenter subtype to a template's plugins to add support for documentation generation via Documenter.jl.

By default, the plugin generates a minimal index.md and a make.jl file. The make.jl file contains the Documenter.makedocs command with predefined values for modules, format, pages, repo, sitename, and authors.

The subtype is expected to include the following fields:

  • assets::Vector{AbstractString}, a list of filenames to be included as the assets

kwarg to makedocs

  • gitignore::Vector{AbstractString}, a list of files to be added to the .gitignore

It may optionally include the field additional_kwargs::Union{AbstractDict, NamedTuple} to allow additional kwargs to be added to makedocs.

source
GitHubPages(; assets::Vector{<:AbstractString}=String[]) -> GitHubPages

Add GitHubPages to a template's plugins to add Documenter support via GitHub Pages, including automatic uploading of documentation from TravisCI. Also adds appropriate badges to the README, and updates the .gitignore accordingly.

Keyword Arguments

  • assets::Vector{<:AbstractString}=String[]: Array of paths to Documenter asset files.
Note

If deploying documentation with Travis CI, don't forget to complete the required configuration (see here).

source
GitLabPages(; assets::Vector{<:AbstractString}=String[]) -> GitLabPages

Add GitLabPages to a template's plugins to add Documenter support via GitLab Pages, including automatic uploading of documentation from GitLabCI. Also adds appropriate badges to the README, and updates the .gitignore accordingly.

Keyword Arguments

  • assets::Vector{<:AbstractString}=String[]: Array of paths to Documenter asset files.
source
+Plugins · PkgTemplates.jl

Plugins

Plugins

Plugins are the secret sauce behind PkgTemplates's customization and extension. This page describes plugins that already exist; for information on writing your own plugins, see Plugin Development.

Continuous Integration (CI)

TravisCI(; config_file::Union{AbstractString, Nothing}="") -> TravisCI

Add TravisCI to a template's plugins to add a .travis.yml configuration file to generated repositories, and an appropriate badge to the README.

Keyword Arguments:

  • config_file::Union{AbstractString, Nothing}="": Path to a custom .travis.yml. If nothing is supplied, no file will be generated.
source
AppVeyor(; config_file::Union{AbstractString, Nothing}="") -> AppVeyor

Add AppVeyor to a template's plugins to add a .appveyor.yml configuration file to generated repositories, and an appropriate badge to the README.

Keyword Arguments

  • config_file::Union{AbstractString, Nothing}="": Path to a custom .appveyor.yml. If nothing is supplied, no file will be generated.
source
GitLabCI(; config_file::Union{AbstractString, Nothing}="", coverage::Bool=true) -> GitLabCI

Add GitLabCI to a template's plugins to add a .gitlab-ci.yml configuration file to generated repositories, and appropriate badge(s) to the README.

Keyword Arguments:

  • config_file::Union{AbstractString, Nothing}="": Path to a custom .gitlab-ci.yml. If nothing is supplied, no file will be generated.
  • coverage::Bool=true: Whether or not GitLab CI's built-in code coverage analysis should be enabled.
source
CirrusCI(; config_file::Union{AbstractString, Nothing}="") -> CirrusCI

Add CirrusCI to a template's plugins to add a .cirrus.yml configuration file to generated repositories, and an appropriate badge to the README. The default configuration file supports only FreeBSD builds via CirrusCI.jl

Keyword Arguments

  • config_file::Union{AbstractString, Nothing}="": Path to a custom .cirrus.yml. If nothing is supplied, no file will be generated.
source

Code Coverage

Codecov(; config_file::Union{AbstractString, Nothing}=nothing) -> Codecov

Add Codecov to a template's plugins to optionally add a .codecov.yml configuration file to generated repositories, and an appropriate badge to the README. Also updates the .gitignore accordingly.

Keyword Arguments:

  • config_file::Union{AbstractString, Nothing}=nothing: Path to a custom .codecov.yml. If left unset, no file will be generated.
source
Coveralls(; config_file::Union{AbstractString, Nothing}=nothing) -> Coveralls

Add Coveralls to a template's plugins to optionally add a .coveralls.yml configuration file to generated repositories, and an appropriate badge to the README. Also updates the .gitignore accordingly.

Keyword Arguments:

  • config_file::Union{AbstractString, Nothing}=nothing: Path to a custom .coveralls.yml. If left unset, no file will be generated.
source

Documentation

Add a Documenter subtype to a template's plugins to add support for documentation generation via Documenter.jl.

By default, the plugin generates a minimal index.md and a make.jl file. The make.jl file contains the Documenter.makedocs command with predefined values for modules, format, pages, repo, sitename, and authors.

The subtype is expected to include the following fields:

  • assets::Vector{AbstractString}, a list of filenames to be included as the assets

kwarg to makedocs

  • gitignore::Vector{AbstractString}, a list of files to be added to the .gitignore

It may optionally include the field additional_kwargs::Union{AbstractDict, NamedTuple} to allow additional kwargs to be added to makedocs.

source
GitHubPages(; assets::Vector{<:AbstractString}=String[]) -> GitHubPages

Add GitHubPages to a template's plugins to add Documenter support via GitHub Pages, including automatic uploading of documentation from TravisCI. Also adds appropriate badges to the README, and updates the .gitignore accordingly.

Keyword Arguments

  • assets::Vector{<:AbstractString}=String[]: Array of paths to Documenter asset files.
Note

If deploying documentation with Travis CI, don't forget to complete the required configuration (see here).

source
GitLabPages(; assets::Vector{<:AbstractString}=String[]) -> GitLabPages

Add GitLabPages to a template's plugins to add Documenter support via GitLab Pages, including automatic uploading of documentation from GitLabCI. Also adds appropriate badges to the README, and updates the .gitignore accordingly.

Keyword Arguments

  • assets::Vector{<:AbstractString}=String[]: Array of paths to Documenter asset files.
source