Update/reorganize docs
This commit is contained in:
parent
1e19351822
commit
d075ff678e
@ -8,21 +8,12 @@ CurrentModule = PkgTemplates
|
||||
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`
|
||||
|
||||
```@docs
|
||||
available_licenses
|
||||
```
|
||||
|
||||
## `show_license`
|
||||
|
||||
```@docs
|
||||
show_license
|
||||
```
|
||||
|
||||
## Helper Functions
|
||||
|
||||
#### `read_license`
|
||||
### Helper Functions
|
||||
|
||||
```@docs
|
||||
read_license
|
||||
|
@ -21,39 +21,13 @@ generate
|
||||
generate_interactive
|
||||
```
|
||||
|
||||
## Helper Functions
|
||||
|
||||
#### `gen_entrypoint`
|
||||
### Helper Functions
|
||||
|
||||
```@docs
|
||||
gen_entrypoint
|
||||
```
|
||||
|
||||
#### `gen_tests`
|
||||
|
||||
```@docs
|
||||
gen_tests
|
||||
```
|
||||
|
||||
#### `gen_require`
|
||||
|
||||
```@docs
|
||||
gen_require
|
||||
```
|
||||
|
||||
#### `gen_readme`
|
||||
|
||||
```@docs
|
||||
gen_readme
|
||||
```
|
||||
|
||||
#### gen_gitignore
|
||||
|
||||
```@docs
|
||||
gen_gitignore
|
||||
```
|
||||
|
||||
#### gen_license
|
||||
```@docs
|
||||
gen_license
|
||||
```
|
||||
|
@ -7,8 +7,9 @@ CurrentModule = PkgTemplates
|
||||
The best and easiest way to contribute to `PkgTemplates` is to write new
|
||||
plugins.
|
||||
|
||||
There are two types of plugins: [`GenericPlugin`](@ref)s and
|
||||
[`CustomPlugin`](@ref)s.
|
||||
```@docs
|
||||
Plugin
|
||||
```
|
||||
|
||||
## Generic Plugins
|
||||
|
||||
|
@ -4,48 +4,28 @@ CurrentModule = PkgTemplates
|
||||
|
||||
# Plugins
|
||||
|
||||
Plugins are the driver for `PkgTemplates`'s customization and extension. This
|
||||
page describes plugins that already exist; for information on writing your
|
||||
own plugins, see [Plugin Development](@ref).
|
||||
Plugins are the secret sauce behing `PkgTemplates`'s customization and extension. This page
|
||||
describes plugins that already exist; for information on writing your own plugins, see
|
||||
[Plugin Development](@ref).
|
||||
|
||||
## `TravisCI`
|
||||
## Continuous Integration (CI)
|
||||
|
||||
```@docs
|
||||
TravisCI
|
||||
```
|
||||
|
||||
## `AppVeyor`
|
||||
|
||||
```@docs
|
||||
AppVeyor
|
||||
```
|
||||
|
||||
## `GitLabCI`
|
||||
|
||||
```@docs
|
||||
GitLabCI
|
||||
```
|
||||
|
||||
## `CodeCov`
|
||||
## Code Coverage
|
||||
|
||||
```@docs
|
||||
CodeCov
|
||||
```
|
||||
|
||||
## `Coveralls`
|
||||
|
||||
```@docs
|
||||
Coveralls
|
||||
```
|
||||
|
||||
## `Documenter`
|
||||
## Documentation
|
||||
|
||||
```@docs
|
||||
Documenter
|
||||
```
|
||||
|
||||
## `GitHubPages`
|
||||
|
||||
```@docs
|
||||
GitHubPages
|
||||
```
|
||||
|
@ -6,10 +6,27 @@ using Mustache
|
||||
using TerminalMenus
|
||||
using URIParser
|
||||
|
||||
export generate, interactive_template, generate_interactive, show_license,
|
||||
available_licenses, Template, GitHubPages, AppVeyor, TravisCI, GitLabCI, CodeCov,
|
||||
export
|
||||
# Template/package generation.
|
||||
Template,
|
||||
generate,
|
||||
interactive_template,
|
||||
generate_interactive,
|
||||
# Licenses.
|
||||
show_license,
|
||||
available_licenses,
|
||||
# Plugins.
|
||||
GitHubPages,
|
||||
AppVeyor,
|
||||
TravisCI,
|
||||
GitLabCI,
|
||||
CodeCov,
|
||||
Coveralls
|
||||
|
||||
"""
|
||||
A plugin to be added to a [`Template`](@ref), which adds some functionality or integration.
|
||||
New plugins should almost always extend [`GenericPlugin`](@ref) or [`CustomPlugin`](@ref).
|
||||
"""
|
||||
abstract type Plugin end
|
||||
|
||||
include("licenses.jl")
|
||||
|
@ -4,6 +4,7 @@
|
||||
t::Template;
|
||||
force::Bool=false,
|
||||
ssh::Bool=false,
|
||||
backup_dir::AbstractString="",
|
||||
) -> Void
|
||||
|
||||
Generate a package named `pkg_name` from `template`.
|
||||
@ -12,7 +13,8 @@ Generate a package named `pkg_name` from `template`.
|
||||
* `force::Bool=false`: Whether or not to overwrite old packages with the same name.
|
||||
* `ssh::Bool=false`: Whether or not to use SSH for the remote.
|
||||
* `backup_dir::AbstractString=""`: Directory in which to store the generated package if
|
||||
`t.dir` is not a valid directory. If left unset, a temporary directory will be created.
|
||||
`t.dir` is not a valid directory. If left unset, a temporary directory will be created
|
||||
(this keyword is mostly for internal usage).
|
||||
|
||||
# Notes
|
||||
The package is generated entirely in a temporary directory and only moved into
|
||||
|
@ -22,7 +22,7 @@ available_licenses() = available_licenses(STDOUT)
|
||||
"""
|
||||
show_license([io::IO], license::AbstractString) -> Void
|
||||
|
||||
Print the text of `license`.
|
||||
Print the text of `license`. Errors if the license is not found.
|
||||
"""
|
||||
show_license(io::IO, license::AbstractString) = println(io, read_license(license))
|
||||
show_license(license::AbstractString) = show_license(STDOUT, license)
|
||||
@ -30,7 +30,7 @@ show_license(license::AbstractString) = show_license(STDOUT, license)
|
||||
"""
|
||||
read_license(license::AbstractString) -> String
|
||||
|
||||
Returns the contents of `license`. Errors if it is not found. Use
|
||||
Returns the contents of `license`. Errors if the license is not found. Use
|
||||
[`available_licenses`](@ref) to view available licenses.
|
||||
"""
|
||||
function read_license(license::AbstractString)
|
||||
|
@ -88,7 +88,7 @@ pattern. They can implement [`gen_plugin`](@ref), [`badges`](@ref), and
|
||||
plugin::MyPlugin,
|
||||
template::Template,
|
||||
dir::AbstractString,
|
||||
pkg_name::AbstractString
|
||||
pkg_name::AbstractString,
|
||||
)
|
||||
if plugin.lucky
|
||||
text = substitute(
|
||||
|
@ -1,12 +1,12 @@
|
||||
"""
|
||||
GitHubPages(; assets::Vector{<:AbstractString}=String[]) -> GitHubPages
|
||||
|
||||
Add `GitHubPages` to a template's plugins to add [Documenter](@ref) support via GitHub
|
||||
Add `GitHubPages` to a template's plugins to add [`Documenter`](@ref) support via GitHub
|
||||
Pages, including automatic uploading of documentation from [`TravisCI`](@ref). Also
|
||||
adds appropriate badges to the README, and updates the `.gitignore` accordingly.
|
||||
|
||||
# Keyword Arguments
|
||||
* `assets::Vector{String}=String[]`: Array of paths to Documenter asset files.
|
||||
* `assets::Vector{<:AbstractString}=String[]`: Array of paths to Documenter asset files.
|
||||
"""
|
||||
@auto_hash_equals struct GitHubPages <: Documenter
|
||||
gitignore::Vector{AbstractString}
|
||||
|
Loading…
Reference in New Issue
Block a user