-
Notifications
You must be signed in to change notification settings - Fork 846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namespaced templates #4039
Comments
I love the idea! This would also address the problem of the templates being hardly documented. Wiki is a media rich enough to help steering in the fogs. |
FWIW, SBT also uses Github-based namespacing for templates, I’ve never heard complaints (unlike other features) and there seems to be quite some support for it: https://www.scala-sbt.org/1.0/docs/sbt-new-and-Templates.html. |
Having a whole repo dedicated to a template sounds like a reasonable option to me. |
I didn't mention it in the initial bit, but I'm not opposed to moving beyond the |
I think I can get my hands dirty with this issue. Was just looking around to get some more Haskell in my systems. |
Awesome, go for it @SkyWriter! |
It seems like some of the discussion lately has been that the templates are all different and it's unclear which to use. Github repos have some metrics that can help:
|
Maybe I'm missing something, but why go for the short syntax of I'd even find that more convenient, if I can directly copy them in from my browser or the other way around. Or is the idea here that you'd actually type these characters down, so we'd like them to be short? |
I regularly type in template names, and I believe many others do too. I use
that feature in training as well. Forcing people to copy paste
significantly longer URLs would be a usability regression from my
perspective.
…On Sun, Jun 3, 2018 at 9:29 AM Niklas Hambüchen ***@***.***> wrote:
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
Maybe I'm missing something, but why go for the short syntax of
github:username/template instead of just using URLs directly?
I'd even find that more convenient, if I can directly copy them in from my
browser or the other way around.
Or is the idea here that you'd actually type these characters down, so
we'd like them to be short?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4039 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADBB6OuitGGI6FgAMATcvrcMRbiVZ_dks5t5ADngaJpZM4UMist>
.
|
Also, full URLs are already supported. |
OK, makes sense! |
Addressed by #4103 |
Darn, missed it by just a couple o' days! Anyways, glad it's landed. |
Get stack templates help from Github file #4039
Issue #4039 - Spec for template name parsing in `stack new`
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 ofstack 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:
github:username/template
can be found on the repohttps://github.com/username/stack-templates
, on the master branch, in the filetemplate.hsfiles
github:
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/template
is treated asgithub:username/template
template
, 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.md
or similar file incommercialhaskell/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.The text was updated successfully, but these errors were encountered: