File: templates_command.md

package info (click to toggle)
haskell-stack 2.15.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,568 kB
  • sloc: haskell: 37,057; makefile: 6; ansic: 5
file content (34 lines) | stat: -rw-r--r-- 1,687 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<div class="hidden-warning"><a href="https://docs.haskellstack.org/"><img src="https://cdn.jsdelivr.net/gh/commercialhaskell/stack/doc/img/hidden-warning.svg"></a></div>

# The `stack templates` command

~~~text
stack templates
~~~

`stack templates` provides information to the standard output stream about
project templates used with the [`stack new` command](new_command.md).

Project templates are specified in `.hsfiles` files. The format of those files
is documented at the
[`commercialhaskell/stack-templates`](https://github.com/commercialhaskell/stack-templates#project-template-format)
repository on GitHub.

Any GitHub, GitLab or Bitbucket repository named `stack-templates` can provide
project template files. For example, a template file
`username/stack-templates/my-template.hsfiles` on GitHub can be identified as
`username/my-template` when using `stack new`. The relevant service can be
specified by a prefix: `github:` for [GitHub](https://github.com/) (the default
service), `gitlab:` for [GitLab](https://gitlab.com), or `bitbucket:` for
[Bitbucket](https://bitbucket.com).

[`commercialhaskell/stack-templates`](https://github.com/commercialhaskell/stack-templates#project-template-format)
on GitHub is the default repository for project templates. Its username
(`commercialhaskell`) does not need to be specified when using `stack new`.

The project template that `stack new` uses by default is named `new-template`
and provided at the default repository.

The default repository provides 24 other project templates. Its Wiki provides
a description of some of those templates and information about the location of
other templates.