Julia Package Initialization

Interactive Pkg Creation

Creating packages is probably easiest to do interactively – it’s hard to remember all of the potential arguments/configurations you want, and the “interactive mode” of PkgTemplates does a nice job of walking you through package creation.

The approach is pretty straightforward:

using PkgTemplates
Template(interactive=true)("MyPkg")

Non-Interactive Pkg Creation

You can also do this non-interactively by running the Template() function with all of the arguments you want. But again, it’s hard to remember everything since you (or at least I) don’t make packages all that often.

But you can do it non-interactively like so:

using PkgTemplates

t = Template(;
    user = "ekholme", #or your git user.name
    license = "MIT",
    authors = ["Eric Ekholm"],
    julia_version = v"1.8", #or w/e version you want
    plugins = [
        GitHubActions(),
        Codecov(),
        GitHubPages(),
        TravisCI()
    ]
)

t("MyPkgName")

And then running this will create a new package (and set up all of your Git stuff if it’s already configured)