Add a basic migration guide

This commit is contained in:
Chris de Graaf 2019-09-24 22:07:54 +07:00
parent 5776537413
commit e05e5bec0a
No known key found for this signature in database
GPG Key ID: 150FFDD9B0073C7B
3 changed files with 68 additions and 0 deletions

View File

@ -14,6 +14,7 @@ makedocs(;
"Home" => "index.md",
"User Guide" => "user.md",
"Developer Guide" => "developer.md",
"Migrating To 0.7+" => "migrating.md",
],
)

View File

@ -21,6 +21,8 @@ If you're looking to **create new packages**, see the [User Guide](user.md).
If you want to **create new plugins**, see the [Developer Guide](developer.md).
if you're trying to **migrate from an older version of PkgTemplates**, see [Migrating To 0.7+](migrating.md).
### Index
```@index

65
docs/src/migrating.md Normal file
View File

@ -0,0 +1,65 @@
```@meta
CurrentModule = PkgTemplates
```
# Migrating To PkgTemplates 0.7+
PkgTemplates 0.7 is a ground-up rewrite of the package with similar functionality but with updated APIs and internals.
Here is a summary of things that existed in older versions but have been moved elsewhere or removed.
However, it might be easier to just read the [User Guide](user.md).
## Template keywords
The recurring theme is "everything is a plugin now".
| Old | New |
| :-: | :-: |
| `license="ISC"` | `plugins=[License(; name="ISC")]` |
| `develop=true` * | `plugins=[Develop()]` |
| `git=false` | `disable_defaults=[Git]` |
| `ssh=true` | `plugins=[Git(; ssh=true)]` |
| `manifest=true` | `plugins=[Git(; manifest=true)]` |
\* `develop=true` was the default setting.
## Plugins
Aside from renamings, basically every plugin has had their constructors reworked.
So if you are using anything non-default, you should consult the new docstring.
| Old | New |
| :-----------: | :--------------------: |
| `GitHubPages` | `Documenter{TravisCI}` |
| `GitLabPages` | `Documenter{GitLabCI}` |
## Package Generation
One less name to remember!
| Old | New |
| :-----------------------------------------: | :---------------------------------: |
| `generate(::Template, pkg::AbstractString)` | `(::Template)(pkg::AbstractString)` |
## Interactive Templates
Two less names to remember!
| Old | New |
| :--------------------: | :---------------------------------: |
| `interactive_template` | `Template(; interactive=true)` |
| `generate_interactive` | `Template(; interactive=true)(pkg)` |
## Other Functions
Another two less names to remember!
Although it's unlikely that anyone used these.
| Old | New |
| :------------------: | :---------------------------------------------------------------------------------: |
| `available_licenses` | [GitHub](https://github.com/invenia/PkgTemplates.jl/tree/master/templates/licenses) |
| `show_license` | [GitHub](https://github.com/invenia/PkgTemplates.jl/tree/master/templates/licenses) |
## Custom Plugins
In addition to the changes in usage, custom plugins from older versions of PkgTemplates will not work in 0.7+.
See the [Developer Guide](developer.md) for more information on the new extension API.