Create new Julia packages, the easy way
Go to file
2017-08-16 02:11:20 -05:00
defaults Remove Docker plugin for now 2017-08-14 11:36:24 -05:00
docs Add reference to CONTRIBUTING.md 2017-08-16 02:11:20 -05:00
licenses Copy over files 2017-08-11 17:18:09 -05:00
src Update docstrings and add docs pages 2017-08-16 01:58:54 -05:00
test Add test for non-default template path 2017-08-16 01:47:46 -05:00
.appveyor.yml PkgTemplates generated files 2017-08-10 12:13:01 -05:00
.codecov.yml PkgTemplates generated files 2017-08-10 12:13:01 -05:00
.gitignore PkgTemplates generated files 2017-08-10 12:13:01 -05:00
.travis.yml PkgTemplates generated files 2017-08-10 12:13:01 -05:00
CONTRIBUTING.md Fix typo 2017-08-16 01:20:20 -05:00
LICENSE Remove license file extension 2017-08-16 01:15:16 -05:00
README.md Add examples to README 2017-08-16 01:12:42 -05:00
REQUIRE Use AutoHashEquals 2017-08-14 13:12:37 -05:00

PkgTemplates

Stable Latest Build Status Build Status CodeCov

PkgTemplates is a Julia package for creating new Julia packages in an easy, repeatable, and customizable way.

Installation

PkgTemplates is registered in METADATA.jl, so just run Pkg.add("PkgTemplates").

Usage

The simplest template only requires your GitHub username.

julia> using PkgTemplates

julia> t = Template(; user="invenia")

julia> generate("MyPkg", t; force=true)
INFO: Initialized git repo at /tmp/tmpvaHVki/MyPkg
INFO: Made initial empty commit
INFO: Set remote origin to https://github.com/invenia/MyPkg.jl
INFO: Staged 5 files/directories: src/, REQUIRE, test/, README.md, .gitignore
INFO: Committed files generated by PkgTemplates
INFO: Copying temporary package directory into /home/degraafc/.julia/v0.6/
INFO: Finished

julia> run(`ls -R $(Pkg.dir("MyPkg"))`)
/home/degraafc/.julia/v0.6/MyPkg:
README.md  REQUIRE  src  test

/home/degraafc/.julia/v0.6/MyPkg/src:
MyPkg.jl

/home/degraafc/.julia/v0.6/MyPkg/test:
runtests.jl

However, we can also configure a number of keyword arguments to Template and generate:

julia> t = Template(;
           user="invenia",
           license="MIT",
           authors=["Chris de Graaf", "Invenia Technical Computing Corporation"],
           years="2016-2017",
           dir=joinpath(ENV["HOME"], "code"),
           julia_version=v"0.5.2",
           git_config=Dict("diff.renames" => true),
           plugins=[
               TravisCI(),
               CodeCov(; config_file=nothing),
               AppVeyor(),
               GitHubPages(; assets=[joinpath(ENV["HOME"], "invenia.css")]),
           ],
       )

julia> generate("MyPkg", t; force=true, ssh=true)
INFO: Initialized git repo at /tmp/tmpe0dWY5/MyPkg
INFO: Applying git configuration
INFO: Made initial empty commit
INFO: Set remote origin to git@github.com:invenia/MyPkg.jl.git
INFO: Created empty gh-pages branch
INFO: Staged 9 files/directories: LICENSE, src/, REQUIRE, test/, README.md, .gitignore, .travis.yml, .appveyor.yml, docs/
INFO: Committed files generated by PkgTemplates
INFO: Copying temporary package directory into /home/degraafc/code/
INFO: Finished
WARNING: Remember to push all created branches to your remote: git push --all

Information on each keyword as well as plugin types can be found in the documentation.