2017-08-10 17:13:01 +00:00
|
|
|
# PkgTemplates
|
2017-08-15 14:19:37 +00:00
|
|
|
|
2017-08-24 18:38:21 +00:00
|
|
|
[](https://invenia.github.io/PkgTemplates.jl/stable)
|
2019-09-01 14:03:19 +00:00
|
|
|
[](https://invenia.github.io/PkgTemplates.jl/dev)
|
2017-08-24 18:38:21 +00:00
|
|
|
[](https://travis-ci.org/invenia/PkgTemplates.jl)
|
2018-11-05 22:05:30 +00:00
|
|
|
[](https://codecov.io/gh/invenia/PkgTemplates.jl)
|
2017-08-16 06:12:42 +00:00
|
|
|
|
2019-09-01 02:48:01 +00:00
|
|
|
**PkgTemplates creates new Julia packages in an easy, repeatable, and customizable way.**
|
2019-01-03 17:47:57 +00:00
|
|
|
|
2019-09-25 14:56:00 +00:00
|
|
|
## Installation
|
|
|
|
|
|
|
|
Install with Pkg, just like any other registered Julia package:
|
|
|
|
|
|
|
|
```jl
|
|
|
|
pkg> add PkgTemplates # Press ']' to enter te Pkg REPL mode.
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Creating a `Template` is as simple as:
|
2017-08-16 06:12:42 +00:00
|
|
|
|
2019-09-01 02:48:01 +00:00
|
|
|
```jl
|
|
|
|
using PkgTemplates
|
|
|
|
t = Template()
|
2017-08-16 06:12:42 +00:00
|
|
|
```
|
2018-09-26 20:55:24 +00:00
|
|
|
|
2019-09-25 14:56:00 +00:00
|
|
|
The no-keywords constructor assumes the existence of some preexisting Git configuration (set with `git config --global`):
|
|
|
|
|
|
|
|
- `user.name`: Your real name, e.g. John Smith.
|
|
|
|
- `user.email`: Your email address, eg. john.smith@acme.corp.
|
|
|
|
- `github.user`: Your GitHub username: e.g. john-smith.
|
|
|
|
|
|
|
|
Once you have a `Template`, use it to generate a package:
|
|
|
|
|
|
|
|
```jl
|
|
|
|
t("MyPkg")
|
|
|
|
```
|
|
|
|
|
2019-09-01 02:48:01 +00:00
|
|
|
However, it's probably desirable to customize the template to your liking with various options and plugins:
|
|
|
|
|
|
|
|
```jl
|
|
|
|
t = Template(;
|
|
|
|
dir="~/code",
|
|
|
|
plugins=[
|
2019-09-20 02:31:56 +00:00
|
|
|
Git(; manifest=true, ssh=true),
|
2019-09-01 02:48:01 +00:00
|
|
|
Codecov(),
|
|
|
|
TravisCI(; x86=true),
|
|
|
|
Documenter{TravisCI}(),
|
2019-09-25 14:56:00 +00:00
|
|
|
o ],
|
2019-09-01 02:48:01 +00:00
|
|
|
)
|
2017-08-16 06:12:42 +00:00
|
|
|
```
|
|
|
|
|
2019-09-25 14:56:00 +00:00
|
|
|
You can also create a `Template` interactively by following a set of prompts:
|
2017-08-16 21:00:15 +00:00
|
|
|
|
2019-09-01 02:48:01 +00:00
|
|
|
```jl
|
2019-09-25 14:56:00 +00:00
|
|
|
julia> t = Template(; interactive=true)
|
2019-09-01 02:48:01 +00:00
|
|
|
```
|
2017-10-01 23:25:12 +00:00
|
|
|
|
2019-09-01 02:48:01 +00:00
|
|
|
---
|
2017-08-17 22:06:05 +00:00
|
|
|
|
2019-09-01 02:48:01 +00:00
|
|
|
For a much more detailled overview, please see the documentation.
|