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,
|
are available for use with `PkgTemplates`, but if you see that one is missing,
|
||||||
don't hesitate to open an issue or PR.
|
don't hesitate to open an issue or PR.
|
||||||
|
|
||||||
## `available_licenses`
|
|
||||||
|
|
||||||
```@docs
|
```@docs
|
||||||
available_licenses
|
available_licenses
|
||||||
```
|
|
||||||
|
|
||||||
## `show_license`
|
|
||||||
|
|
||||||
```@docs
|
|
||||||
show_license
|
show_license
|
||||||
```
|
```
|
||||||
|
|
||||||
## Helper Functions
|
### Helper Functions
|
||||||
|
|
||||||
#### `read_license`
|
|
||||||
|
|
||||||
```@docs
|
```@docs
|
||||||
read_license
|
read_license
|
||||||
|
@ -21,39 +21,13 @@ generate
|
|||||||
generate_interactive
|
generate_interactive
|
||||||
```
|
```
|
||||||
|
|
||||||
## Helper Functions
|
### Helper Functions
|
||||||
|
|
||||||
#### `gen_entrypoint`
|
|
||||||
|
|
||||||
```@docs
|
```@docs
|
||||||
gen_entrypoint
|
gen_entrypoint
|
||||||
```
|
|
||||||
|
|
||||||
#### `gen_tests`
|
|
||||||
|
|
||||||
```@docs
|
|
||||||
gen_tests
|
gen_tests
|
||||||
```
|
|
||||||
|
|
||||||
#### `gen_require`
|
|
||||||
|
|
||||||
```@docs
|
|
||||||
gen_require
|
gen_require
|
||||||
```
|
|
||||||
|
|
||||||
#### `gen_readme`
|
|
||||||
|
|
||||||
```@docs
|
|
||||||
gen_readme
|
gen_readme
|
||||||
```
|
|
||||||
|
|
||||||
#### gen_gitignore
|
|
||||||
|
|
||||||
```@docs
|
|
||||||
gen_gitignore
|
gen_gitignore
|
||||||
```
|
|
||||||
|
|
||||||
#### gen_license
|
|
||||||
```@docs
|
|
||||||
gen_license
|
gen_license
|
||||||
```
|
```
|
||||||
|
@ -7,8 +7,9 @@ CurrentModule = PkgTemplates
|
|||||||
The best and easiest way to contribute to `PkgTemplates` is to write new
|
The best and easiest way to contribute to `PkgTemplates` is to write new
|
||||||
plugins.
|
plugins.
|
||||||
|
|
||||||
There are two types of plugins: [`GenericPlugin`](@ref)s and
|
```@docs
|
||||||
[`CustomPlugin`](@ref)s.
|
Plugin
|
||||||
|
```
|
||||||
|
|
||||||
## Generic Plugins
|
## Generic Plugins
|
||||||
|
|
||||||
|
@ -4,48 +4,28 @@ CurrentModule = PkgTemplates
|
|||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
|
|
||||||
Plugins are the driver for `PkgTemplates`'s customization and extension. This
|
Plugins are the secret sauce behing `PkgTemplates`'s customization and extension. This page
|
||||||
page describes plugins that already exist; for information on writing your
|
describes plugins that already exist; for information on writing your own plugins, see
|
||||||
own plugins, see [Plugin Development](@ref).
|
[Plugin Development](@ref).
|
||||||
|
|
||||||
## `TravisCI`
|
## Continuous Integration (CI)
|
||||||
|
|
||||||
```@docs
|
```@docs
|
||||||
TravisCI
|
TravisCI
|
||||||
```
|
|
||||||
|
|
||||||
## `AppVeyor`
|
|
||||||
|
|
||||||
```@docs
|
|
||||||
AppVeyor
|
AppVeyor
|
||||||
```
|
|
||||||
|
|
||||||
## `GitLabCI`
|
|
||||||
|
|
||||||
```@docs
|
|
||||||
GitLabCI
|
GitLabCI
|
||||||
```
|
```
|
||||||
|
|
||||||
## `CodeCov`
|
## Code Coverage
|
||||||
|
|
||||||
```@docs
|
```@docs
|
||||||
CodeCov
|
CodeCov
|
||||||
```
|
|
||||||
|
|
||||||
## `Coveralls`
|
|
||||||
|
|
||||||
```@docs
|
|
||||||
Coveralls
|
Coveralls
|
||||||
```
|
```
|
||||||
|
|
||||||
## `Documenter`
|
## Documentation
|
||||||
|
|
||||||
```@docs
|
```@docs
|
||||||
Documenter
|
Documenter
|
||||||
```
|
|
||||||
|
|
||||||
## `GitHubPages`
|
|
||||||
|
|
||||||
```@docs
|
|
||||||
GitHubPages
|
GitHubPages
|
||||||
```
|
```
|
||||||
|
@ -6,10 +6,27 @@ using Mustache
|
|||||||
using TerminalMenus
|
using TerminalMenus
|
||||||
using URIParser
|
using URIParser
|
||||||
|
|
||||||
export generate, interactive_template, generate_interactive, show_license,
|
export
|
||||||
available_licenses, Template, GitHubPages, AppVeyor, TravisCI, GitLabCI, CodeCov,
|
# Template/package generation.
|
||||||
|
Template,
|
||||||
|
generate,
|
||||||
|
interactive_template,
|
||||||
|
generate_interactive,
|
||||||
|
# Licenses.
|
||||||
|
show_license,
|
||||||
|
available_licenses,
|
||||||
|
# Plugins.
|
||||||
|
GitHubPages,
|
||||||
|
AppVeyor,
|
||||||
|
TravisCI,
|
||||||
|
GitLabCI,
|
||||||
|
CodeCov,
|
||||||
Coveralls
|
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
|
abstract type Plugin end
|
||||||
|
|
||||||
include("licenses.jl")
|
include("licenses.jl")
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
t::Template;
|
t::Template;
|
||||||
force::Bool=false,
|
force::Bool=false,
|
||||||
ssh::Bool=false,
|
ssh::Bool=false,
|
||||||
|
backup_dir::AbstractString="",
|
||||||
) -> Void
|
) -> Void
|
||||||
|
|
||||||
Generate a package named `pkg_name` from `template`.
|
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.
|
* `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.
|
* `ssh::Bool=false`: Whether or not to use SSH for the remote.
|
||||||
* `backup_dir::AbstractString=""`: Directory in which to store the generated package if
|
* `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
|
# Notes
|
||||||
The package is generated entirely in a temporary directory and only moved into
|
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
|
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(io::IO, license::AbstractString) = println(io, read_license(license))
|
||||||
show_license(license::AbstractString) = show_license(STDOUT, 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
|
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.
|
[`available_licenses`](@ref) to view available licenses.
|
||||||
"""
|
"""
|
||||||
function read_license(license::AbstractString)
|
function read_license(license::AbstractString)
|
||||||
|
@ -88,7 +88,7 @@ pattern. They can implement [`gen_plugin`](@ref), [`badges`](@ref), and
|
|||||||
plugin::MyPlugin,
|
plugin::MyPlugin,
|
||||||
template::Template,
|
template::Template,
|
||||||
dir::AbstractString,
|
dir::AbstractString,
|
||||||
pkg_name::AbstractString
|
pkg_name::AbstractString,
|
||||||
)
|
)
|
||||||
if plugin.lucky
|
if plugin.lucky
|
||||||
text = substitute(
|
text = substitute(
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
"""
|
"""
|
||||||
GitHubPages(; assets::Vector{<:AbstractString}=String[]) -> GitHubPages
|
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
|
Pages, including automatic uploading of documentation from [`TravisCI`](@ref). Also
|
||||||
adds appropriate badges to the README, and updates the `.gitignore` accordingly.
|
adds appropriate badges to the README, and updates the `.gitignore` accordingly.
|
||||||
|
|
||||||
# Keyword Arguments
|
# 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
|
@auto_hash_equals struct GitHubPages <: Documenter
|
||||||
gitignore::Vector{AbstractString}
|
gitignore::Vector{AbstractString}
|
||||||
|
Loading…
Reference in New Issue
Block a user