From cd48e46d6ee222e5de6d4c63eba2ae5ae01ac537 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Wed, 7 Apr 2021 16:07:56 -0600 Subject: [PATCH 1/2] Add a docstring to the module --- src/PkgTemplates.jl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/PkgTemplates.jl b/src/PkgTemplates.jl index 8c9ae6d8..a8357006 100644 --- a/src/PkgTemplates.jl +++ b/src/PkgTemplates.jl @@ -1,3 +1,32 @@ +""" +PkgTemplates creates new Julia packages in an easy, repeatable, and customizable way. + +# Usage +You can fully customize your package interactively with: +``` +using PkgTemplates +Template(interactive=true)("MyPkg") +``` +Alternatively, you can manually create a `Template` with: +```jl +using PkgTemplates +tpl = Template() +``` + +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 +tpl("MyPkg") +``` + +For a much more detailed overview, please see [the User Guide +documentation](https://invenia.github.io/PkgTemplates.jl/stable/user/). +""" module PkgTemplates using Base: active_project, contractuser From 9f12029e71072847629f042ddc39b27983346a0f Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Thu, 8 Apr 2021 09:03:15 -0600 Subject: [PATCH 2/2] Use README.md as module docstring Co-authored-by: Nick Robinson --- src/PkgTemplates.jl | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/PkgTemplates.jl b/src/PkgTemplates.jl index a8357006..ba693138 100644 --- a/src/PkgTemplates.jl +++ b/src/PkgTemplates.jl @@ -1,32 +1,4 @@ -""" -PkgTemplates creates new Julia packages in an easy, repeatable, and customizable way. - -# Usage -You can fully customize your package interactively with: -``` -using PkgTemplates -Template(interactive=true)("MyPkg") -``` -Alternatively, you can manually create a `Template` with: -```jl -using PkgTemplates -tpl = Template() -``` - -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 -tpl("MyPkg") -``` - -For a much more detailed overview, please see [the User Guide -documentation](https://invenia.github.io/PkgTemplates.jl/stable/user/). -""" +@doc read(joinpath(dirname(@__DIR__), "README.md"), String) module PkgTemplates using Base: active_project, contractuser