@@ -13,9 +13,6 @@ The project is created in a new directory named after the package, unless the
13
13
` --bare ` flag is passed, in which case the project is created in the current
14
14
directory.
15
15
16
- The template used is a default one (named ` new-template ` ), unless another
17
- template is specified as an argument.
18
-
19
16
The ` --param <key>:<value> ` option specifies a key-value pair to populate a key
20
17
in a template. The option can be specified multiple times.
21
18
@@ -24,34 +21,43 @@ The arguments specifying directories and the `--ignore-subdirs`, `--force` and
24
21
25
22
## Project templates
26
23
27
- Project template files can be located in a repository named ` stack-templates ` on
28
- GitHub, GitLab or Bitbucket; at a URL; or on the local file system.
24
+ A project template file can be located in a repository named ` stack-templates `
25
+ on GitHub, GitLab or Bitbucket; at a URL; or on the local file system.
29
26
30
27
Project template file names have the extension ` .hsfiles ` . The extension does
31
- not need to be specified.
28
+ not need to be specified with ` stack new ` .
32
29
33
30
A project template file ` my-template.hsfiles ` in a repository
34
- ` username/stack-templates ` on GitHub, GitLab or Bitbucket can be specified as:
31
+ ` username/stack-templates ` on GitHub, GitLab or Bitbucket can be specified
32
+ with ` stack new ` as:
35
33
36
34
~~~ test
37
35
<service>:username/my-template
38
36
~~~
39
37
40
38
where ` <service> ` is one of ` github ` for [ GitHub] ( https://github.com/ ) ,
41
- ` gitlab: ` for [ GitLab] ( https://gitlab.com ) , or ` bitbucket: ` for
39
+ ` gitlab ` for [ GitLab] ( https://gitlab.com ) , or ` bitbucket ` for
42
40
[ Bitbucket] ( https://bitbucket.com ) .
43
41
44
42
The default service is GitHub, the default username is ` commercialhaskell ` and
45
43
the default project template name is ` new-template ` .
46
44
47
45
## Examples
48
46
49
- Create a project with the default project template:
47
+ Create a project for package ` my-project ` in new directory ` my-project ` with the
48
+ default project template file:
50
49
51
50
~~~ text
52
51
stack new my-project
53
52
~~~
54
53
54
+ Create a project for package ` my-package ` in the current directory with the
55
+ default project template file:
56
+
57
+ ~~~ text
58
+ stack new my-package --bare
59
+ ~~~
60
+
55
61
Create a project with the ` rio ` project template at the default repository:
56
62
57
63
~~~ text
0 commit comments