Problem There is no clear criteria right now for which templates should be included in the stack-templates repo. No one person has control over this repo, making it difficult for tutorial authors to rely on it in their documentation. The output of stack templates can be overwhelming.
Proposed solution Introduce namespacing into the template concept. There definitely room to modify this, but as an initial proposal that keeps backwards compatibility, let's consider:
- A template name
github:username/template can be found on the repo https://github.com/username/stack-templates, on the master branch, in the file template.hsfiles
- The
github: leader is for future proofing, if someone wants to add support for Gitlab, Bitbucket, or others
- If
github: is left off, it is filled in automatically, so that username/template is treated as github:username/template
- Similarly, if the username namespacing is left off, e.g.
template, the assumed username is commercialhaskell, falling back to the current behavior
Then, as an example, the Yesod templates could end up being referred to as yesodweb/postgres, etc.
To deal with the overwhelming output from stack templates: what if we have a README.md or similar file in commercialhaskell/stack-templates which is downloaded and displayed to the user explaining a few of the common templates, and then pointing to a Wiki page or similar where people can share more templates.
Problem There is no clear criteria right now for which templates should be included in the
stack-templatesrepo. No one person has control over this repo, making it difficult for tutorial authors to rely on it in their documentation. The output ofstack templatescan be overwhelming.Proposed solution Introduce namespacing into the template concept. There definitely room to modify this, but as an initial proposal that keeps backwards compatibility, let's consider:
github:username/templatecan be found on the repohttps://github.com/username/stack-templates, on the master branch, in the filetemplate.hsfilesgithub:leader is for future proofing, if someone wants to add support for Gitlab, Bitbucket, or othersgithub:is left off, it is filled in automatically, so thatusername/templateis treated asgithub:username/templatetemplate, the assumed username iscommercialhaskell, falling back to the current behaviorThen, as an example, the Yesod templates could end up being referred to as
yesodweb/postgres, etc.To deal with the overwhelming output from
stack templates: what if we have aREADME.mdor similar file incommercialhaskell/stack-templateswhich is downloaded and displayed to the user explaining a few of the common templates, and then pointing to a Wiki page or similar where people can share more templates.